home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / shell / sh-utils.000 / sh-utils / usr / info / sh-utils.info
Encoding:
GNU Info File  |  1995-05-28  |  94.1 KB  |  2,761 lines

  1. This is Info file sh-utils.info, produced by Makeinfo-1.55 from the
  2. input file sh-utils.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * Shell utilities: (sh-utils).        GNU shell utilities.
  6. * basename: (sh-utils)basename invocation.    Strip directory and suffix.
  7. * date: (sh-utils)date invocation.        Print/set system date and time.
  8. * dirname: (sh-utils)dirname invocation.    Strip non-directory suffix.
  9. * echo: (sh-utils)echo invocation.        Print a line of text.
  10. * env: (sh-utils)env invocation.        Modify the environment.
  11. * expr: (sh-utils)expr invocation.        Evaluate expressions.
  12. * false: (sh-utils)false invocation.        Do nothing, unsuccessfully.
  13. * groups: (sh-utils)groups invocation.        Print group names a user is in.
  14. * hostname: (sh-utils)hostname invocation.    Print or set system name.
  15. * id: (sh-utils)id invocation.            Print real/effective uid/gid.
  16. * logname: (sh-utils)logname invocation.    Print current login name.
  17. * nice: (sh-utils)nice invocation.        Modify scheduling priority.
  18. * pathchk: (sh-utils)pathchk invocation.    Check file name portability.
  19. * printenv: (sh-utils)printenv invocation.    Print environment variables.
  20. * printf: (sh-utils)printf invocation.            Format and print data.
  21. * pwd: (sh-utils)pwd invocation.            Print working directory.
  22. * sleep: (sh-utils)sleep invocation.            Delay for a specified time.
  23. * stty: (sh-utils)stty invocation.            Print/change terminal settings.
  24. * su: (sh-utils)su invocation.                    Modify user and group id.
  25. * tee: (sh-utils)tee invocation.            Redirect to multiple files.
  26. * test: (sh-utils)test invocation.            File/string tests.
  27. * true: (sh-utils)true invocation.            Do nothing, successfully.
  28. * tty: (sh-utils)tty invocation.            Print terminal name.
  29. * uname: (sh-utils)uname invocation.            Print system information.
  30. * users: (sh-utils)users invocation.            Print current user names.
  31. * who: (sh-utils)who invocation.            Print who is logged in.
  32. * whoami: (sh-utils)whoami invocation.        Print effective user id.
  33. * yes: (sh-utils)yes invocation.        Print a string indefinitely.
  34. END-INFO-DIR-ENTRY
  35.  
  36.    This file documents the GNU shell utilities.
  37.  
  38.    Copyright (C) 1994 Free Software Foundation, Inc.
  39.  
  40.    Permission is granted to make and distribute verbatim copies of this
  41. manual provided the copyright notice and this permission notice are
  42. preserved on all copies.
  43.  
  44.    Permission is granted to copy and distribute modified versions of
  45. this manual under the conditions for verbatim copying, provided that
  46. the entire resulting derived work is distributed under the terms of a
  47. permission notice identical to this one.
  48.  
  49.    Permission is granted to copy and distribute translations of this
  50. manual into another language, under the above conditions for modified
  51. versions, except that this permission notice may be stated in a
  52. translation approved by the Foundation.
  53.  
  54. 
  55. File: sh-utils.info,  Node: Top,  Next: Introduction,  Prev: (DIR),  Up: (DIR)
  56.  
  57. GNU shell utilities
  58. *******************
  59.  
  60.    This manual minimally documents version GNU sh-utils 1.12 of the GNU
  61. shell utilities.
  62.  
  63. * Menu:
  64.  
  65. * Introduction::        Caveats, overview, and authors.
  66. * Common options::              Common options.
  67. * Printing text::               echo printf yes
  68. * Conditions::                  false true test expr
  69. * Redirection::                 tee
  70. * File name manipulation::      dirname basename pathchk
  71. * Working context information:: pwd stty printenv tty
  72. * User information::            id logname whoami groups users who
  73. * System context::              date uname hostname
  74. * Modified command invocation:: env nice nohup su
  75. * Delaying::                    sleep
  76. * Index::                       General index.
  77.  
  78. 
  79. File: sh-utils.info,  Node: Introduction,  Next: Common options,  Prev: Top,  Up: Top
  80.  
  81. Introduction
  82. ************
  83.  
  84.    First of all, this manual is incomplete.  The `stty' section, in
  85. particular, needs substantial reorganization and additional explanatory
  86. text before it will be up to the standard of other GNU manuals.
  87. Explanatory text in general is lacking; the manual presently assumes you
  88. pretty much know what to do, and just need to be reminded of how.  Thus,
  89. if you are interested, please get involved in improving this manual.
  90. The entire GNU community will benefit.
  91.  
  92.    Some of these programs are useful only when writing shell scripts;
  93. utilities like these are, in fact, the "language" of shell scripts (to
  94. a great extent).  Others are occasionally useful interactively.
  95.  
  96.    The GNU shell utilities are mostly compatible with the POSIX.2
  97. standard.
  98.  
  99.    Please report bugs to `bug-gnu-utils@prep.ai.mit.edu'.  Remember to
  100. include the version number, machine architecture, input files, and any
  101. other information needed to reproduce the bug.  *Note Bugs: (gcc)Bugs.
  102.  
  103.    This manual is based on the Unix man pages in the distribution, which
  104. were originally written by David MacKenzie and updated by Jim Meyering.
  105. Franc,ois Pinard did the initial conversion to Texinfo format.  Karl
  106. Berry did the indexing, some reorganization, and editing of the results.
  107. Richard Stallman contributed his usual invaluable insights to the
  108. overall process.
  109.  
  110. 
  111. File: sh-utils.info,  Node: Common options,  Next: Printing text,  Prev: Introduction,  Up: Top
  112.  
  113. Common options
  114. **************
  115.  
  116.    Certain options are available in all these programs.  Rather than
  117. writing identical descriptions for each of the programs, they are
  118. described here.  (In fact, every GNU program accepts (or should accept)
  119. these options.)
  120.  
  121.    Many of these programs take arbitrary strings as arguments.  In those
  122. cases, `--help' and `--version' are taken as these options only if
  123. there is one and exactly one command line argument.
  124.  
  125. `--help'
  126.      Print a usage message listing all available options, then exit
  127.      successfully.
  128.  
  129. `--version'
  130.      Print the version number, then exit successfully.
  131.  
  132. 
  133. File: sh-utils.info,  Node: Printing text,  Next: Conditions,  Prev: Common options,  Up: Top
  134.  
  135. Printing text
  136. *************
  137.  
  138.    This section describes commands that display text strings.
  139.  
  140. * Menu:
  141.  
  142. * echo invocation::             Print a line of text.
  143. * printf invocation::           Format and print data.
  144. * yes invocation::              Print a string until interrupted.
  145.  
  146. 
  147. File: sh-utils.info,  Node: echo invocation,  Next: printf invocation,  Up: Printing text
  148.  
  149. `echo': Print a line of text
  150. ============================
  151.  
  152.    Synopsis:
  153.  
  154.      echo [ OPTION ]... [ STRING ]...
  155.  
  156.    `echo' writes each given STRING to standard output, with a space
  157. between each and a newline after the last one.
  158.  
  159.    The program accepts the following options.  Also see *Note Common
  160. options::.
  161.  
  162. `-n'
  163.      Do not output the trailing newline.
  164.  
  165. `-e'
  166.      Enable interpretation of the following backslash-escaped
  167.      characters in each STRING:
  168.  
  169.     `\a'
  170.           alert (bell)
  171.  
  172.     `\b'
  173.           backspace
  174.  
  175.     `\c'
  176.           suppress trailing newline
  177.  
  178.     `\f'
  179.           form feed
  180.  
  181.     `\n'
  182.           new line
  183.  
  184.     `\r'
  185.           carriage return
  186.  
  187.     `\t'
  188.           horizontal tab
  189.  
  190.     `\v'
  191.           vertical tab
  192.  
  193.     `\\'
  194.           backslash
  195.  
  196.     `\NNN'
  197.           the character whose ASCII code is NNN (octal); if NNN is not
  198.           a valid octal number, it is printed literally.
  199.  
  200. 
  201. File: sh-utils.info,  Node: printf invocation,  Next: yes invocation,  Prev: echo invocation,  Up: Printing text
  202.  
  203. `printf': Format and print data
  204. ===============================
  205.  
  206.    Synopsis:
  207.  
  208.      printf FORMAT [ ARGUMENT ]...
  209.  
  210.    `printf' prints the FORMAT string, interpreting `%' directives and
  211. `\' escapes in the same way as the C `printf' function.  The FORMAT
  212. argument is re-used as necessary to convert all of the given ARGUMENTs.
  213.  
  214.    `printf' has one additional directive, `%b', which prints its
  215. argument string with `\' escapes interpreted in the same way as in the
  216. FORMAT string.
  217.  
  218.    `printf' interprets `\0ooo' in FORMAT as an octal number (if OOO is
  219. 0 to 3 octal digits) specifying a character to print, and `\xhhh' as a
  220. hexadecimal number (if HHH is 1 to 3 hex digits) specifying a character
  221. to print.
  222.  
  223.    An additional escape, `\c', causes `printf' to produce no further
  224. output.
  225.  
  226.    The only options are a lone `--help' or `--version'.  *Note Common
  227. options::.
  228.  
  229. 
  230. File: sh-utils.info,  Node: yes invocation,  Prev: printf invocation,  Up: Printing text
  231.  
  232. `yes': Print a string until interrupted
  233. =======================================
  234.  
  235.    `yes' prints the command line arguments, separated by spaces and
  236. followed by a newline, forever until it is killed.  If no arguments are
  237. given, it prints `y' followed by a newline forever until killed.
  238.  
  239.    The only options are a lone `--help' or `--version'.  *Note Common
  240. options::.
  241.  
  242. 
  243. File: sh-utils.info,  Node: Conditions,  Next: Redirection,  Prev: Printing text,  Up: Top
  244.  
  245. Conditions
  246. **********
  247.  
  248.    This section describes commands that are primarily useful for their
  249. exit status, rather than their output.  Thus, they are often used as the
  250. condition of shell `if' statements, or as the last command in a
  251. pipeline.
  252.  
  253. * Menu:
  254.  
  255. * false invocation::            Do nothing, unsuccessfully.
  256. * true invocation::             Do nothing, successfully.
  257. * test invocation::             Check file types and compare values.
  258. * expr invocation::             Evaluate expressions.
  259.  
  260. 
  261. File: sh-utils.info,  Node: false invocation,  Next: true invocation,  Up: Conditions
  262.  
  263. `false': Do nothing, unsuccessfully
  264. ===================================
  265.  
  266.    `false' does nothing except return an exit status of 1, meaning
  267. "failure".  It can be used as a place holder in shell scripts where an
  268. unsuccessful command is needed.
  269.  
  270.    Any arguments are ignored, except for a lone `--help' or `--version'
  271. (*note Common options::.).
  272.  
  273. 
  274. File: sh-utils.info,  Node: true invocation,  Next: test invocation,  Prev: false invocation,  Up: Conditions
  275.  
  276. `true': Do nothing, successfully
  277. ================================
  278.  
  279.    `true' does nothing except return an exit status of 0, meaning
  280. "success".  It can be used as a place holder in shell scripts where a
  281. successful command is needed, although the shell built-in command `:'
  282. (colon) may be faster.
  283.  
  284.    Any arguments are ignored, except for a lone `--help' or `--version'
  285. (*note Common options::.).
  286.  
  287. 
  288. File: sh-utils.info,  Node: test invocation,  Next: expr invocation,  Prev: true invocation,  Up: Conditions
  289.  
  290. `test': Check file types and compare values
  291. ===========================================
  292.  
  293.    `test' returns a status of 0 (true) or 1 (false) depending on the
  294. evaluation of the conditional expression EXPR.  Each part of the
  295. expression must be a separate argument.
  296.  
  297.    `test' has file status checks, string operators, and numeric
  298. comparison operators.
  299.  
  300.    Because most shells have a built-in command by the same name, using
  301. the unadorned command name in a script or interactively may get you
  302. different functionality than that described here.
  303.  
  304.    Besides the options below, `test' accepts a lone `--help' or
  305. `--version'.  *Note Common options::.  A single non-option argument is
  306. also allowed: `test' returns true if the argument is not null.
  307.  
  308. * Menu:
  309.  
  310. * File type tests::             -[bcdfhLpSt]
  311. * Access permission tests::     -[gkruwxOG]
  312. * File characteristics tests::  -e -s -nt -ot -ef
  313. * String tests::                -z -n = !=
  314. * Numeric tests::               -eq -ne -lt -le -gt -ge
  315. * Connectives for test::        ! -a -o
  316.  
  317. 
  318. File: sh-utils.info,  Node: File type tests,  Next: Access permission tests,  Up: test invocation
  319.  
  320. File type tests
  321. ---------------
  322.  
  323.    These options test for particular types of files.  (Everything's a
  324. file, but not all files are the same!)
  325.  
  326. `-b FILE'
  327.      True if FILE exists and is a block special device.
  328.  
  329. `-c FILE'
  330.      True if FILE exists and is a character special device.
  331.  
  332. `-d FILE'
  333.      True if FILE exists and is a directory.
  334.  
  335. `-f FILE'
  336.      True if FILE exists and is a regular file.
  337.  
  338. `-h FILE'
  339. `-L FILE'
  340.      True if FILE exists and is a symbolic link.
  341.  
  342. `-p FILE'
  343.      True if FILE exists and is a named pipe.
  344.  
  345. `-S FILE'
  346.      True if FILE exists and is a socket.
  347.  
  348. `-t [ FD ]'
  349.      True if FD is opened on a terminal.  If FD is omitted, it defaults
  350.      to 1 (standard output).
  351.  
  352. 
  353. File: sh-utils.info,  Node: Access permission tests,  Next: File characteristics tests,  Prev: File type tests,  Up: test invocation
  354.  
  355. Access permission tests
  356. -----------------------
  357.  
  358.    These options test for particular access permissions.
  359.  
  360. `-g FILE'
  361.      True if FILE exists and has its set-group-id bit set.
  362.  
  363. `-k FILE'
  364.      True if FILE has its "sticky" bit set.
  365.  
  366. `-r FILE'
  367.      True if FILE exists and is readable.
  368.  
  369. `-u FILE'
  370.      True if FILE exists and has its set-user-id bit set.
  371.  
  372. `-w FILE'
  373.      True if FILE exists and is writable.
  374.  
  375. `-x FILE'
  376.      True if FILE exists and is executable.
  377.  
  378. `-O FILE'
  379.      True if FILE exists and is owned by the current effective user id.
  380.  
  381. `-G FILE'
  382.      True if FILE exists and is owned by the current effective group id.
  383.  
  384. 
  385. File: sh-utils.info,  Node: File characteristics tests,  Next: String tests,  Prev: Access permission tests,  Up: test invocation
  386.  
  387. File characteristics tests
  388. --------------------------
  389.  
  390.    These options test other file characteristics.
  391.  
  392. `-e FILE'
  393.      True if FILE exists.
  394.  
  395. `-s FILE'
  396.      True if FILE exists and has a size greater than zero.
  397.  
  398. `FILE1 -nt FILE2'
  399.      True if FILE1 is newer (according to modification date) than FILE2.
  400.  
  401. `FILE1 -ot FILE2'
  402.      True if FILE1 is older (according to modification date) than FILE2.
  403.  
  404. `FILE1 -ef FILE2'
  405.      True if FILE1 and FILE2 have the same device and inode numbers,
  406.      i.e., if they are hard links to each other.
  407.  
  408. 
  409. File: sh-utils.info,  Node: String tests,  Next: Numeric tests,  Prev: File characteristics tests,  Up: test invocation
  410.  
  411. String tests
  412. ------------
  413.  
  414.    These options test string characteristics.  Strings are not quoted
  415. for `test', though you may need to quote them to protect characters
  416. with special meaning to the shell, e.g., spaces.
  417.  
  418. `-z STRING'
  419.      True if the length of STRING is zero.
  420.  
  421. `-n STRING'
  422. `STRING'
  423.      True if the length of STRING is non-zero.
  424.  
  425. `STRING1 = STRING2'
  426.      True if the strings are equal.
  427.  
  428. `STRING1 != STRING2'
  429.      True if the strings are not equal.
  430.  
  431. 
  432. File: sh-utils.info,  Node: Numeric tests,  Next: Connectives for test,  Prev: String tests,  Up: test invocation
  433.  
  434. Numeric tests
  435. -------------
  436.  
  437.    Numeric relationals.  The arguments must be entirely numeric
  438. (possibly negative), or the special expression `-l STRING', which
  439. evaluates to the length of STRING.
  440.  
  441. `ARG1 -eq ARG2'
  442. `ARG1 -ne ARG2'
  443. `ARG1 -lt ARG2'
  444. `ARG1 -le ARG2'
  445. `ARG1 -gt ARG2'
  446. `ARG1 -ge ARG2'
  447.      These arithmetic binary operators return true if ARG1 is equal,
  448.      not-equal, less-than, less-than-or-equal, greater-than, or
  449.      greater-than-or-equal than ARG2, respectively.
  450.  
  451.    For example:
  452.  
  453.      test -1 -gt -2 && echo yes
  454.      => yes
  455.      test -l abc -gt 1 && echo yes
  456.      => yes
  457.      test 0x100 -eq 1
  458.      error--> test: integer expression expected before -eq
  459.  
  460. 
  461. File: sh-utils.info,  Node: Connectives for test,  Prev: Numeric tests,  Up: test invocation
  462.  
  463. Connectives for `test'
  464. ----------------------
  465.  
  466.    The usual logical connectives.
  467.  
  468. `! EXPR'
  469.      True if EXPR is false.
  470.  
  471. `EXPR1 -a EXPR2'
  472.      True if both EXPR1 and EXPR2 are true.
  473.  
  474. `EXPR1 -o EXPR2'
  475.      True if either EXPR1 or EXPR2 is true.
  476.  
  477. 
  478. File: sh-utils.info,  Node: expr invocation,  Prev: test invocation,  Up: Conditions
  479.  
  480. `expr': Evaluate expressions
  481. ============================
  482.  
  483.    `expr' evaluates an expression and writes the result on standard
  484. output.  Each token of the expression must be a separate argument.
  485.  
  486.    Operands are either numbers or strings.  `expr' coerces anything
  487. appearing in an operand position to an integer or a string depending on
  488. the operation being applied to it.
  489.  
  490.    Strings are not quoted for `expr', though you may need to quote them
  491. to protect characters with special meaning to the shell, e.g., spaces.
  492.  
  493.    Operators may given as infix symbols or prefix keywords.  Parentheses
  494. may be used for grouping in the usual manner (you must quote parentheses
  495. to avoid the shell evaluating them, however).
  496.  
  497.    Exit status:
  498.  
  499.      0 if the expression is neither null nor 0,
  500.      1 if the expression is null or 0,
  501.      2 for invalid expressions.
  502.  
  503. * Menu:
  504.  
  505. * Relations for expr::          | & < <= = == != >= >
  506. * Numeric expressions::         + - * / %
  507. * String expressions::          : match substr index length
  508. * Examples of expr::            Examples.
  509.  
  510. 
  511. File: sh-utils.info,  Node: Relations for expr,  Next: Numeric expressions,  Up: expr invocation
  512.  
  513. Relations for `expr'
  514. --------------------
  515.  
  516.    The usual logical connectives and relations, in order of precedence.
  517.  
  518. `|'
  519.      Yields its first argument if it is neither null nor 0, otherwise
  520.      its second argument.
  521.  
  522. `&'
  523.      Yields its first argument if neither argument is null or 0,
  524.      otherwise 0.
  525.  
  526. `< <= = == != >= >'
  527.      Compare the arguments and return 1 if the relation is true, 0
  528.      otherwise.  `==' is a synonym for `='.  `expr' first tries to
  529.      coerce both arguments to numbers and do a numeric comparison; if
  530.      either coercion fails, it does a lexicographic comparison.
  531.  
  532. 
  533. File: sh-utils.info,  Node: Numeric expressions,  Next: String expressions,  Prev: Relations for expr,  Up: expr invocation
  534.  
  535. Numeric expressions
  536. -------------------
  537.  
  538.    Numeric operators, in order of increasing precedence.  The
  539. connectives (previous section) have higher precedence, the string
  540. operators (following section) have lower.
  541.  
  542. `+ -'
  543.      Addition and subtraction.  Both arguments are coerced to numbers;
  544.      an error occurs if this cannot be done.
  545.  
  546. `* / %'
  547.      Multiplication, division, remainder.  Both arguments are coerced to
  548.      numbers; an error occurs if this cannot be done.
  549.  
  550. 
  551. File: sh-utils.info,  Node: String expressions,  Next: Examples of expr,  Prev: Numeric expressions,  Up: expr invocation
  552.  
  553. String expressions
  554. ------------------
  555.  
  556.    String operators.  These have lowest precedence.
  557.  
  558. `STRING : REGEX'
  559.      Perform pattern matching.  The arguments are coerced to strings
  560.      and the second is considered to be a (basic, a la `grep') regular
  561.      expression, with a `^' implicitly prepended.  The first argument is
  562.      then matched against this regular expression.
  563.  
  564.      If the match succeeds and REGEX uses `\(' and `\)', the `:'
  565.      expression returns the part of STRING that matched the
  566.      subexpression; otherwise, it returns the number of characters
  567.      matched.
  568.  
  569.      If the match fails, the `:' operator returns the null string if
  570.      `\(' and `\)' are used in REGEX, otherwise 0.
  571.  
  572.      Only the first `\( ... \)' pair is relevant to the return value;
  573.      additional pairs are meaningful only for grouping the regular
  574.      expression operators.
  575.  
  576.      *Note Regular Expression Library: (regex)Top, for details of
  577.      regular expression syntax.
  578.  
  579. `match STRING REGEX'
  580.      An alternative way to do pattern matching.  This is the same as
  581.      `STRING : REGEX'.
  582.  
  583. `substr STRING POSITION LENGTH'
  584.      Returns the substring of STRING beginning at POSITION with length
  585.      at most LENGTH.  If either POSITION or LENGTH is negative or
  586.      non-numeric, returns the null string.
  587.  
  588. `index STRING CHARACTER-CLASS'
  589.      Returns the first position in STRING where the first character in
  590.      CHARSET was found.  If no character in CHARSET is found in STRING,
  591.      return 0.
  592.  
  593. `length STRING'
  594.      Returns the length of STRING.
  595.  
  596.    The keywords cannot be used as strings.
  597.  
  598. 
  599. File: sh-utils.info,  Node: Examples of expr,  Prev: String expressions,  Up: expr invocation
  600.  
  601. Examples of `expr'
  602. ------------------
  603.  
  604.    Here are a few examples, including quoting for shell metacharacters.
  605.  
  606.    To add 1 to the shell variable `foo', in Bourne-compatible shells:
  607.      foo=`expr $foo + 1`
  608.  
  609.    To print the non-directory part of the file name stored in `$fname',
  610. which need not contain a `/'.
  611.      expr $fname : '.*/\(^.*\)' '^|' $fname
  612.  
  613.      expr abc : 'a\(.\)c'
  614.      => b
  615.      expr index abcdef cz
  616.      => 3
  617.      expr index index a
  618.      error--> expr: syntax error
  619.  
  620. 
  621. File: sh-utils.info,  Node: Redirection,  Next: File name manipulation,  Prev: Conditions,  Up: Top
  622.  
  623. Redirection
  624. ***********
  625.  
  626.    Unix shells commonly provide several forms of "redirection"--ways to
  627. change the input source or output destination of a command.  But one
  628. useful redirection is performed by a separate command, not by the shell;
  629. it's described here.
  630.  
  631. * Menu:
  632.  
  633. * tee invocation::              Redirect output to multiple files.
  634.  
  635. 
  636. File: sh-utils.info,  Node: tee invocation,  Up: Redirection
  637.  
  638. `tee': Redirect output to multiple files
  639. ========================================
  640.  
  641.    The `tee' command copies standard input to standard output and also
  642. to any files given as arguments.  This is useful when you want not only
  643. to send some data down a pipe, but also to save a copy.
  644.  
  645.    Synopsis:
  646.  
  647.      tee [ OPTION ]... [ FILE ]...
  648.  
  649.    If a file being written to does not already exist, it is created.
  650. If a file being written to already exists, the data it previously
  651. contained is overwritten unless the `-a' option is used.
  652.  
  653.    The program accepts the following options.  Also see *Note Common
  654. options::.
  655.  
  656. `-a'
  657. `--append'
  658.      Append standard input to the given files rather than overwriting
  659.      them.
  660.  
  661. `-i'
  662. `--ignore-interrupts'
  663.      Ignore interrupt signals.
  664.  
  665. 
  666. File: sh-utils.info,  Node: File name manipulation,  Next: Working context information,  Prev: Redirection,  Up: Top
  667.  
  668. File name manipulation
  669. **********************
  670.  
  671.    This section describes commands that manipulate file names.
  672.  
  673. * Menu:
  674.  
  675. * basename invocation::         Strip directory and suffix from a file name.
  676. * dirname invocation::          Strip non-directory suffix from a file name.
  677. * pathchk invocation::          Check file name portability.
  678.  
  679. 
  680. File: sh-utils.info,  Node: basename invocation,  Next: dirname invocation,  Up: File name manipulation
  681.  
  682. `basename': Strip directory and suffix from a file name
  683. =======================================================
  684.  
  685.    Synopsis:
  686.  
  687.      basename NAME [ SUFFIX ]
  688.  
  689.    The `basename' command removes any leading directory components from
  690. NAME.  If SUFFIX is specified and is identical to the end of NAME, it
  691. is removed from NAME as well.  `basename' prints the result on standard
  692. output.
  693.  
  694.    The only options are `--help' and `--version'.  *Note Common
  695. options::.
  696.  
  697. 
  698. File: sh-utils.info,  Node: dirname invocation,  Next: pathchk invocation,  Prev: basename invocation,  Up: File name manipulation
  699.  
  700. `dirname': Strip non-directory suffix from a file name
  701. ======================================================
  702.  
  703.    Synopsis:
  704.  
  705.      dirname NAME
  706.  
  707.    `dirname' prints all but the final slash-delimited component of
  708. NAME.  If NAME is a single component, `dirname' prints `.' (meaning the
  709. current directory).
  710.  
  711.    The only options are `--help' and `--version'.  *Note Common
  712. options::.
  713.  
  714. 
  715. File: sh-utils.info,  Node: pathchk invocation,  Prev: dirname invocation,  Up: File name manipulation
  716.  
  717. `pathchk': Check file name portability
  718. ======================================
  719.  
  720.    Synopsis:
  721.  
  722.      pathchk [ OPTION ]... NAME...
  723.  
  724.    For each NAME, `pathchk' prints a message if any of these conditions
  725. is true:
  726.   1. one of the existing directories in NAME does not have search
  727.      (execute) permission,
  728.  
  729.   2. the length of NAME is larger than its filesystem's maximum file
  730.      name length,
  731.  
  732.   3. the length of one component of NAME, corresponding to an existing
  733.      directory name, is larger than its filesystem's maximum length for
  734.      a file name component.
  735.  
  736.    The program accepts the following option.  Also see *Note Common
  737. options::.
  738.  
  739. `-p'
  740. `--portability'
  741.      Instead of performing length checks on the underlying filesystem,
  742.      test the length of each file name and its components against the
  743.      POSIX.1 minimum limits for portability.  Also check that the file
  744.      name contains no characters not in the portable file name
  745.      character set.
  746.  
  747.    Exit status:
  748.  
  749.      0 if all specified file names passed all of the tests,
  750.      1 otherwise.
  751.  
  752. 
  753. File: sh-utils.info,  Node: Working context information,  Next: User information,  Prev: File name manipulation,  Up: Top
  754.  
  755. Working context information
  756. ***************************
  757.  
  758.    This section describes commands that display or alter the context in
  759. which you are working: the current directory, the terminal settings, and
  760. so forth.  See also the user-related commands in the next section.
  761.  
  762. * Menu:
  763.  
  764. * pwd invocation::              Print working directory.
  765. * stty invocation::             Print or change terminal characteristics.
  766. * printenv invocation::         Print environment variables.
  767. * tty invocation::              Print file name of terminal on standard input.
  768.  
  769. 
  770. File: sh-utils.info,  Node: pwd invocation,  Next: stty invocation,  Up: Working context information
  771.  
  772. `pwd': Print working directory
  773. ==============================
  774.  
  775.    `pwd' prints the fully resolved name of the current directory.  That
  776. is, all components of the printed name will be actual directory
  777. names--none will be symbolic links.
  778.  
  779.    Because most shells have a built-in command by the same name, using
  780. the unadorned command name in a script or interactively may get you
  781. different functionality than that described here.
  782.  
  783.    The only options are a lone `--help' or `--version'.  *Note Common
  784. options::.
  785.  
  786. 
  787. File: sh-utils.info,  Node: stty invocation,  Next: printenv invocation,  Prev: pwd invocation,  Up: Working context information
  788.  
  789. `stty': Print or change terminal characteristics
  790. ================================================
  791.  
  792.    If given no arguments, `stty' prints the baud rate, line discipline
  793. number (on systems that support it), and line settings that have been
  794. changed from the values set by `stty sane'.  Mode reading and setting
  795. are performed on the tty line connected to standard input.
  796.  
  797.    `stty' accepts many non-option arguments that change aspects of the
  798. terminal line operation, as described below.
  799.  
  800.    Synopses:
  801.  
  802.      stty [ SETTING ]...
  803.      stty [ OPTION ]
  804.  
  805.    The program accepts the following options.  Also see *Note Common
  806. options::.
  807.  
  808. `-a'
  809. `--all'
  810.      Print all current settings in human-readable form.
  811.  
  812. `-g'
  813. `--save'
  814.      Print all current settings in a form that can be used as an
  815.      argument to another `stty' command to restore the current settings.
  816.  
  817.    Many settings can be turned off by preceding them with a `-'.  Such
  818. arguments are marked below with "May be negated" in their description.
  819. The descriptions themselves refer to the positive case, that is, when
  820. *not* negated (unless stated otherwise, of course).
  821.  
  822.    Some settings are not available on all POSIX systems, since they use
  823. extensions.  Such arguments are marked below with "Non-POSIX" in their
  824. description.  On non-POSIX systems, those or other settings also may not
  825. be available, but it's not feasible to document all the variations: just
  826. try it and see.
  827.  
  828. * Menu:
  829.  
  830. * Control::                     Control settings
  831. * Input::                       Input settings
  832. * Output::                      Output settings
  833. * Local::                       Local settings
  834. * Combination::                 Combination settings
  835. * Characters::                  Special characters
  836. * Special::                     Special settings
  837.  
  838. 
  839. File: sh-utils.info,  Node: Control,  Next: Input,  Up: stty invocation
  840.  
  841. Control settings
  842. ----------------
  843.  
  844.    Control settings:
  845.  
  846. `parenb'
  847.      Generate parity bit in output and expect parity bit in input.  May
  848.      be negated.
  849.  
  850. `parodd'
  851.      Set odd parity (even if negated).  May be negated.
  852.  
  853. `cs5'
  854. `cs6'
  855. `cs7'
  856. `cs8'
  857.      Set character size to 5, 6, 7, or 8 bits.
  858.  
  859. `hup'
  860. `hupcl'
  861.      Send a hangup signal when the last process closes the tty.  May be
  862.      negated.
  863.  
  864. `cstopb'
  865.      Use two stop bits per character (one if negated).  May be negated.
  866.  
  867. `cread'
  868.      Allow input to be received.  May be negated.
  869.  
  870. `clocal'
  871.      Disable modem control signals.  May be negated.
  872.  
  873. `crtscts'
  874.      Enable RTS/CTS flow control.  Non-POSIX.  May be negated.
  875.  
  876. 
  877. File: sh-utils.info,  Node: Input,  Next: Output,  Prev: Control,  Up: stty invocation
  878.  
  879. Input settings
  880. --------------
  881.  
  882. `ignbrk'
  883.      Ignore breaks.  May be negated.
  884.  
  885. `brkint'
  886.      Make breaks cause an interrupt signal.  May be negated.
  887.  
  888. `ignpar'
  889.      Ignore parity errors.  May be negated.
  890.  
  891. `parmrk'
  892.      Mark parity errors (with a 255-0-character sequence).  May be
  893.      negated.
  894.  
  895. `inpck'
  896.      Enable input parity checking.  May be negated.
  897.  
  898. `istrip'
  899.      Clear high (8th) bit of input characters.  May be negated.
  900.  
  901. `inlcr'
  902.      Translate newline to carriage return.  May be negated.
  903.  
  904. `igncr'
  905.      Ignore carriage return.  May be negated.
  906.  
  907. `icrnl'
  908.      Translate carriage return to newline.  May be negated.
  909.  
  910. `ixon'
  911.      Enable XON/XOFF flow control (that is, CTRL-s/CTRL-Q).  May be
  912.      negated.
  913.  
  914. `ixoff'
  915. `tandem'
  916.      Enable sending of `stop' character when the system input buffer is
  917.      almost full, and `start' character when it becomes almost empty
  918.      again.  May be negated.
  919.  
  920. `iuclc'
  921.      Translate uppercase characters to lowercase.  Non-POSIX.  May be
  922.      negated.
  923.  
  924. `ixany'
  925.      Allow any character to restart output (only the start character if
  926.      negated).  Non-POSIX.  May be negated.
  927.  
  928. `imaxbel'
  929.      Enable beeping and not flushing input buffer if a character arrives
  930.      when the input buffer is full.  Non-POSIX.  May be negated.
  931.  
  932. 
  933. File: sh-utils.info,  Node: Output,  Next: Local,  Prev: Input,  Up: stty invocation
  934.  
  935. Output settings
  936. ---------------
  937.  
  938.    These arguments specify output-related operations.
  939.  
  940. `opost'
  941.      Postprocess output.  May be negated.
  942.  
  943. `olcuc'
  944.      Translate lowercase characters to uppercase.  Non-POSIX.  May be
  945.      negated.
  946.  
  947. `ocrnl'
  948.      Translate carriage return to newline.  Non-POSIX.  May be negated.
  949.  
  950. `onlcr'
  951.      Translate newline to carriage return-newline.  Non-POSIX.  May be
  952.      negated.
  953.  
  954. `onocr'
  955.      Do not print carriage returns in the first column.  Non-POSIX.
  956.      May be negated.
  957.  
  958. `onlret'
  959.      Newline performs a carriage return.  Non-POSIX.  May be negated.
  960.  
  961. `ofill'
  962.      Use fill (padding) characters instead of timing for delays.
  963.      Non-POSIX.  May be negated.
  964.  
  965. `ofdel'
  966.      Use delete characters for fill instead of null characters.
  967.      Non-POSIX.  May be negated.
  968.  
  969. `nl1'
  970. `nl0'
  971.      Newline delay style.  Non-POSIX.
  972.  
  973. `cr3'
  974. `cr2'
  975. `cr1'
  976. `cr0'
  977.      Carriage return delay style.  Non-POSIX.
  978.  
  979. `tab3'
  980. `tab2'
  981. `tab1'
  982. `tab0'
  983.      Horizontal tab delay style.  Non-POSIX.
  984.  
  985. `bs1'
  986. `bs0'
  987.      Backspace delay style.  Non-POSIX.
  988.  
  989. `vt1'
  990. `vt0'
  991.      Vertical tab delay style.  Non-POSIX.
  992.  
  993. `ff1'
  994. `ff0'
  995.      Form feed delay style.  Non-POSIX.
  996.  
  997. 
  998. File: sh-utils.info,  Node: Local,  Next: Combination,  Prev: Output,  Up: stty invocation
  999.  
  1000. Local settings
  1001. --------------
  1002.  
  1003. `isig'
  1004.      Enable `interrupt', `quit', and `suspend' special characters.  May
  1005.      be negated.
  1006.  
  1007. `icanon'
  1008.      Enable `erase', `kill', `werase', and `rprnt' special characters.
  1009.      May be negated.
  1010.  
  1011. `iexten'
  1012.      Enable non-POSIX special characters.  May be negated.
  1013.  
  1014. `echo'
  1015.      Echo input characters.  May be negated.
  1016.  
  1017. `echoe'
  1018. `crterase'
  1019.      Echo `erase' characters as backspace-space-backspace.  May be
  1020.      negated.
  1021.  
  1022. `echok'
  1023.      Echo a newline after a `kill' character.  May be negated.
  1024.  
  1025. `echonl'
  1026.      Echo newline even if not echoing other characters.  May be negated.
  1027.  
  1028. `noflsh'
  1029.      Disable flushing after `interrupt' and `quit' special characters.
  1030.      May be negated.
  1031.  
  1032. `xcase'
  1033.      Enable input and output of uppercase characters by preceding their
  1034.      lowercase equivalents with `\', when `icanon' is set.  Non-POSIX.
  1035.      May be negated.
  1036.  
  1037. `tostop'
  1038.      Stop background jobs that try to write to the terminal.  Non-POSIX.
  1039.      May be negated.
  1040.  
  1041. `echoprt'
  1042. `prterase'
  1043.      Echo erased characters backward, between `\' and `/'.  Non-POSIX.
  1044.      May be negated.
  1045.  
  1046. `echoctl'
  1047. `ctlecho'
  1048.      Echo control characters in hat notation (`^C') instead of
  1049.      literally.  Non-POSIX.  May be negated.
  1050.  
  1051. `echoke'
  1052. `crtkill'
  1053.      Echo the `kill' special character by erasing each character on the
  1054.      line as indicated by the `echoprt' and `echoe' settings, instead
  1055.      of by the `echoctl' and `echok' settings.  Non-POSIX.  May be
  1056.      negated.
  1057.  
  1058. 
  1059. File: sh-utils.info,  Node: Combination,  Next: Characters,  Prev: Local,  Up: stty invocation
  1060.  
  1061. Combination settings
  1062. --------------------
  1063.  
  1064.    Combination settings:
  1065.  
  1066. `evenp'
  1067. `parity'
  1068.      Same as `parenb -parodd cs7'.  May be negated.  If negated, same
  1069.      as `-parenb cs8'.
  1070.  
  1071. `oddp'
  1072.      Same as `parenb parodd cs7'.  May be negated.  If negated, same as
  1073.      `-parenb cs8'.
  1074.  
  1075. `nl'
  1076.      Same as `-icrnl -onlcr'.  May be negated.  If negated, same as
  1077.      `icrnl -inlcr -igncr onlcr -ocrnl -onlret'.
  1078.  
  1079. `ek'
  1080.      Reset the `erase' and `kill' special characters to their default
  1081.      values.
  1082.  
  1083. `sane'
  1084.      Same as:
  1085.           cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany
  1086.           imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel
  1087.           nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl
  1088.           -noflsh -xcase -tostop -echoprt echoctl echoke
  1089.       and also sets all special characters to their default values.
  1090.  
  1091. `cooked'
  1092.      Same as `brkint ignpar istrip icrnl ixon opost isig icanon', plus
  1093.      sets the `eof' and `eol' characters to their default values if
  1094.      they are the same as the `min' and `time' characters.  May be
  1095.      negated.  If negated, same as `raw'.
  1096.  
  1097. `raw'
  1098.      Same as:
  1099.           -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
  1100.           -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon
  1101.           -xcase min 1 time 0
  1102.       May be negated.  If negated, same as `cooked'.
  1103.  
  1104. `cbreak'
  1105.      Same as `-icanon'.  May be negated.  If negated, same as `icanon'.
  1106.  
  1107. `pass8'
  1108.      Same as `-parenb -istrip cs8'.  May be negated.  If negated, same
  1109.      as `parenb istrip cs7'.
  1110.  
  1111. `litout'
  1112.      Same as `-parenb -istrip -opost cs8'.  May be negated.  If
  1113.      negated, same as `parenb istrip opost cs7'.
  1114.  
  1115. `decctlq'
  1116.      Same as `-ixany'.  Non-POSIX.  May be negated.
  1117.  
  1118. `tabs'
  1119.      Same as `tab0'.  Non-POSIX.  May be negated.  If negated, same as
  1120.      `tab3'.
  1121.  
  1122. `lcase'
  1123. `LCASE'
  1124.      Same as `xcase iuclc olcuc'.  Non-POSIX.  May be negated.
  1125.  
  1126. `crt'
  1127.      Same as `echoe echoctl echoke'.
  1128.  
  1129. `dec'
  1130.      Same as `echoe echoctl echoke -ixany intr ^C erase ^? kill C-u'.
  1131.  
  1132. 
  1133. File: sh-utils.info,  Node: Characters,  Next: Special,  Prev: Combination,  Up: stty invocation
  1134.  
  1135. Special characters
  1136. ------------------
  1137.  
  1138.    The special characters' default values vary from system to system.
  1139. They are set with the syntax `name value', where the names are listed
  1140. below and the value can be given either literally, in hat notation
  1141. (`^C'), or as an integer which may start with `0x' to indicate
  1142. hexadecimal, `0' to indicate octal, or any other digit to indicate
  1143. decimal.
  1144.  
  1145.    For GNU stty, giving a value of `^-' or `undef' disables that
  1146. special character.  (This is incompatible with Ultrix `stty', which
  1147. uses  a value of `u' to disable a special character.  GNU `stty' treats
  1148. a value `u' like any other, namely to set that special character to u.)
  1149.  
  1150. `intr'
  1151.      Send an interrupt signal.
  1152.  
  1153. `quit'
  1154.      Send a quit signal.
  1155.  
  1156. `erase'
  1157.      Erase the last character typed.
  1158.  
  1159. `kill'
  1160.      Erase the current line.
  1161.  
  1162. `eof'
  1163.      Send an end of file (terminate the input).
  1164.  
  1165. `eol'
  1166.      End the line.
  1167.  
  1168. `eol2'
  1169.      Alternate character to end the line.  Non-POSIX.
  1170.  
  1171. `swtch'
  1172.      Switch to a different shell layer.  Non-POSIX.
  1173.  
  1174. `start'
  1175.      Restart the output after stopping it.
  1176.  
  1177. `stop'
  1178.      Stop the output.
  1179.  
  1180. `susp'
  1181.      Send a terminal stop signal.
  1182.  
  1183. `dsusp'
  1184.      Send a terminal stop signal after flushing the input.  Non-POSIX.
  1185.  
  1186. `rprnt'
  1187.      Redraw the current line.  Non-POSIX.
  1188.  
  1189. `werase'
  1190.      Erase the last word typed.  Non-POSIX.
  1191.  
  1192. `lnext'
  1193.      Enter the next character typed literally, even if it is a special
  1194.      character.  Non-POSIX.
  1195.  
  1196. 
  1197. File: sh-utils.info,  Node: Special,  Prev: Characters,  Up: stty invocation
  1198.  
  1199. Special settings
  1200. ----------------
  1201.  
  1202. `min N'
  1203.      Set the minimum number of characters that will satisfy a read until
  1204.      the time value has expired, when `-icanon' is set.
  1205.  
  1206. `time N'
  1207.      Set the number of tenths of a second before reads time out if the
  1208.      min number of characters have not been read, when `-icanon' is set.
  1209.  
  1210. `ispeed N'
  1211.      Set the input speed to N.
  1212.  
  1213. `ospeed N'
  1214.      Set the output speed to N.
  1215.  
  1216. `rows N'
  1217.      Tell the tty kernel driver that the terminal has N rows.
  1218.      Non-POSIX.
  1219.  
  1220. `cols N'
  1221. `columns N'
  1222.      Tell the kernel that the terminal has N columns.  Non-POSIX.
  1223.  
  1224. `size'
  1225.      Print the number of rows and columns that the kernel thinks the
  1226.      terminal has.  (Systems that don't support rows and cols in the
  1227.      kernel typically use the environment variables `LINES' and
  1228.      `COLUMNS' instead; however, GNU `stty' does not know anything
  1229.      about them.) Non-POSIX.
  1230.  
  1231. `line N'
  1232.      Use line discipline N.  Non-POSIX.
  1233.  
  1234. `speed'
  1235.      Print the terminal speed.
  1236.  
  1237. `N'
  1238.      Set the input and output speeds to N.  N can be one of: 0 50 75
  1239.      110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200 38400
  1240.      `exta' `extb'.  `exta' is the same as 19200; `extb' is the same as
  1241.      38400.  0 hangs up the line if `-clocal' is set.
  1242.  
  1243. 
  1244. File: sh-utils.info,  Node: printenv invocation,  Next: tty invocation,  Prev: stty invocation,  Up: Working context information
  1245.  
  1246. `printenv': Print all or some environment variables
  1247. ===================================================
  1248.  
  1249.    Synopsis:
  1250.  
  1251.      printenv [ OPTION ] [ VARIABLE ]...
  1252.  
  1253.    If no VARIABLEs are specified, `printenv' prints the value of every
  1254. environment variable.  Otherwise, it prints the value of each VARIABLE
  1255. that is set, and nothing for those that are not set.
  1256.  
  1257.    The only options are a lone `--help' or `--version'.  *Note Common
  1258. options::.
  1259.  
  1260.    Exit status:
  1261.  
  1262.      0 if all variables specified were found
  1263.      1 if at least one specified variable was not found
  1264.      2 if a write error occurred
  1265.  
  1266. 
  1267. File: sh-utils.info,  Node: tty invocation,  Prev: printenv invocation,  Up: Working context information
  1268.  
  1269. `tty': Print file name of terminal on standard input
  1270. ====================================================
  1271.  
  1272.    `tty' prints the file name of the tty connected to its standard
  1273. input.  It prints `not a tty' if standard input is not a tty.
  1274.  
  1275.    Synopsis:
  1276.  
  1277.      tty [ OPTION ]...
  1278.  
  1279.    The program accepts the following option.  Also see *Note Common
  1280. options::.
  1281.  
  1282. `-s'
  1283. `--silent'
  1284. `--quiet'
  1285.      Print nothing; only return an exit status.
  1286.  
  1287.    Exit status:
  1288.  
  1289.      0 if standard input is a tty
  1290.      1 if standard input is not a tty
  1291.      2 if given incorrect arguments
  1292.      3 if a write error occurs
  1293.  
  1294. 
  1295. File: sh-utils.info,  Node: User information,  Next: System context,  Prev: Working context information,  Up: Top
  1296.  
  1297. User information
  1298. ****************
  1299.  
  1300.    This section describes commands that print user-related information:
  1301. logins, groups, and so forth.
  1302.  
  1303. * Menu:
  1304.  
  1305. * id invocation::               Print real and effective uid and gid.
  1306. * logname invocation::          Print current login name.
  1307. * whoami invocation::           Print effective user id.
  1308. * groups invocation::           Print group names a user is in.
  1309. * users invocation::            Print login names of users currently logged in.
  1310. * who invocation::              Print who is currently logged in.
  1311.  
  1312. 
  1313. File: sh-utils.info,  Node: id invocation,  Next: logname invocation,  Up: User information
  1314.  
  1315. `id': Print real and effective uid and gid
  1316. ==========================================
  1317.  
  1318. `id' prints information about the given user, or the process running it
  1319. if no user is specified.
  1320.  
  1321.    Synopsis:
  1322.  
  1323.      id [ OPTION ]... [ USERNAME ]
  1324.  
  1325.    By default, it prints the real user id, real group id, effective
  1326. user id if different from the real user id, effective group id if
  1327. different from the real group id, and supplemental group ids.
  1328.  
  1329.    Each of these numeric values is preceded by an identifying string and
  1330. followed by the corresponding user or group name in parentheses.
  1331.  
  1332.    The options cause `id' to print only part of the above information.
  1333. Also see *Note Common options::.
  1334.  
  1335. `-g'
  1336. `--group'
  1337.      Print only the group id.
  1338.  
  1339. `-G'
  1340. `--groups'
  1341.      Print only the supplementary groups.
  1342.  
  1343. `-n'
  1344. `--name'
  1345.      Print the user or group name instead of the ID number.  Requires
  1346.      `-u', `-g', or `-G'.
  1347.  
  1348. `-r'
  1349. `--real'
  1350.      Print the real, instead of effective, user or group id.  Requires
  1351.      `-u', `-g', or `-G'.
  1352.  
  1353. `-u'
  1354. `--user'
  1355.      Print only the user id.
  1356.  
  1357. 
  1358. File: sh-utils.info,  Node: logname invocation,  Next: whoami invocation,  Prev: id invocation,  Up: User information
  1359.  
  1360. `logname': Print current login name
  1361. ===================================
  1362.  
  1363.    `logname' prints the calling user's name, as found in the file
  1364. `/etc/utmp', and exits with a status of 0.  If there is no `/etc/utmp'
  1365. entry for the calling process, `logname' prints an error message and
  1366. exits with a status of 1.
  1367.  
  1368.    The only options are `--help' and `--version'.  *Note Common
  1369. options::.
  1370.  
  1371. 
  1372. File: sh-utils.info,  Node: whoami invocation,  Next: groups invocation,  Prev: logname invocation,  Up: User information
  1373.  
  1374. `whoami': Print effective user id
  1375. =================================
  1376.  
  1377.    `whoami' prints the user name associated with the current effective
  1378. user id.  It is equivalent to the command `id -un'.
  1379.  
  1380.    The only options are `--help' and `--version'.  *Note Common
  1381. options::.
  1382.  
  1383. 
  1384. File: sh-utils.info,  Node: groups invocation,  Next: users invocation,  Prev: whoami invocation,  Up: User information
  1385.  
  1386. `groups': Print group names a user is in
  1387. ========================================
  1388.  
  1389.    `groups' prints the names of the primary and any supplementary
  1390. groups that each given USERNAME, or the current process if none are
  1391. given, is in.  If user names are given, the name of each user is
  1392. printed before the list of that user's groups.
  1393.  
  1394.    Synopsis:
  1395.  
  1396.      groups [ USERNAME ]...
  1397.  
  1398.    The group lists are equivalent to the output of the command `id -Gn'.
  1399.  
  1400.    The only options are `--help' and `--version'.  *Note Common
  1401. options::.
  1402.  
  1403. 
  1404. File: sh-utils.info,  Node: users invocation,  Next: who invocation,  Prev: groups invocation,  Up: User information
  1405.  
  1406. `users': Print login names of users currently logged in
  1407. =======================================================
  1408.  
  1409.    `users' prints on a single line a blank-separated list of user names
  1410. of users currently logged in to the current host.  Each user name
  1411. corresponds to a login session, so if a user has more than one login
  1412. session, that user's name will appear the same number of times in the
  1413. output.
  1414.  
  1415.    Synopsis:
  1416.  
  1417.      users [ FILE ]
  1418.  
  1419.    With no FILE argument, `users' extracts its information from the
  1420. file `/etc/utmp'.  If a file argument is given, `users' uses that file
  1421. instead.  A common choice is `/etc/wtmp'.
  1422.  
  1423.    The only options are `--help' and `--version'.  *Note Common
  1424. options::.
  1425.  
  1426. 
  1427. File: sh-utils.info,  Node: who invocation,  Prev: users invocation,  Up: User information
  1428.  
  1429. `who': Print who is currently logged in
  1430. =======================================
  1431.  
  1432.    Synopsis:
  1433.  
  1434.      `who' [ OPTION ] [ FILE ] [ am i ]
  1435.  
  1436.    If given no non-option arguments, `who' prints the following
  1437. information for each user currently logged on: login name, terminal
  1438. line, login time, and remote hostname or X display.
  1439.  
  1440.    If given one non-option argument, `who' uses that instead of
  1441. `/etc/utmp' as the name of the file containing the record of users
  1442. logged on.  `/etc/wtmp' is commonly given as an argument to `who' to
  1443. look at who has previously logged on.
  1444.  
  1445.    If given two non-option arguments, `who' prints only the entry for
  1446. the user running it (determined from its standard input), preceded by
  1447. the hostname.  Traditionally, the two arguments given are `am i', as in
  1448. `who am i'.
  1449.  
  1450.    The program accepts the following options.  Also see *Note Common
  1451. options::.
  1452.  
  1453. `-m'
  1454.      Same as `who am i'.
  1455.  
  1456. `-q'
  1457. `--count'
  1458.      Print only the login names and the number of users logged on.
  1459.      Overrides all other options.
  1460.  
  1461. `-s'
  1462.      Ignored; for compatibility with other versions of `who'.
  1463.  
  1464. `-i'
  1465. `-u'
  1466. `--idle'
  1467.      After the login time, print the number of hours and minutes that
  1468.      the user has been idle.  `.' means the user was active in last
  1469.      minute.  `old' means the user was idle for more than 24 hours.
  1470.  
  1471. `-H'
  1472. `--heading'
  1473.      Print a line of column headings.
  1474.  
  1475. `-w'
  1476. `-T'
  1477. `--mesg'
  1478. `--message'
  1479. `--writable'
  1480.      After each login name print a character indicating the user's
  1481.      message status:
  1482.  
  1483.           `+' allowing `write' messages
  1484.           `-' disallowing `write' messages
  1485.           `?' cannot find terminal device
  1486.  
  1487. 
  1488. File: sh-utils.info,  Node: System context,  Next: Modified command invocation,  Prev: User information,  Up: Top
  1489.  
  1490. System context
  1491. **************
  1492.  
  1493.    This section describes commands that print or change system-wide
  1494. information.
  1495.  
  1496. * Menu:
  1497.  
  1498. * date invocation::             Print or set system date and time.
  1499. * uname invocation::            Print system information.
  1500. * hostname invocation::         Print or set system name.
  1501.  
  1502. 
  1503. File: sh-utils.info,  Node: date invocation,  Next: uname invocation,  Up: System context
  1504.  
  1505. `date': Print or set system date and time
  1506. =========================================
  1507.  
  1508.    `date' with no arguments prints the current time and date, in the
  1509. format of the `%c' directive (described below).
  1510.  
  1511.    Synopses:
  1512.  
  1513.      date [ OPTION ]... [ +FORMAT ]
  1514.      date [ -u|--utc|--universal ] [ MMDDHHMM[[CC]YY][.SS] ]
  1515.  
  1516.    If given an argument that starts with a `+', `date' prints the
  1517. current time and date (or the time and date specified by the `--date'
  1518. option, see below) in the format defined by that argument, which is the
  1519. same as in the `strftime' function.  Except for directives, which start
  1520. with `%', characters in the format string are printed unchanged.  The
  1521. directives are described below.
  1522.  
  1523.    By default, `date' pads numeric fields with zeroes.  GNU `date'
  1524. recognizes the following numeric modifiers between the `%' and the
  1525. directive.  These are GNU extensions.
  1526.  
  1527. `-'
  1528.      (hyphen) do not pad the field
  1529.  
  1530. `_'
  1531.      (underscore) pad the field with spaces
  1532.  
  1533. * Menu:
  1534.  
  1535. * Time directives::             %[HIklMprsSTXZ]
  1536. * Date directives::             %[aAbBcdDhjmUwWxyY]
  1537. * Literal directives::          %[%nt]
  1538. * Setting the time::            Changing the system clock.
  1539. * Options for date::            Instead of the current time.
  1540. * Examples of date::            Examples.
  1541.  
  1542. 
  1543. File: sh-utils.info,  Node: Time directives,  Next: Date directives,  Up: date invocation
  1544.  
  1545. Time directives
  1546. ---------------
  1547.  
  1548.    `date' directives related to times.
  1549.  
  1550. `%H'
  1551.      hour (00...23)
  1552.  
  1553. `%I'
  1554.      hour (01...12)
  1555.  
  1556. `%k'
  1557.      hour ( 0...23)
  1558.  
  1559. `%l'
  1560.      hour ( 1...12)
  1561.  
  1562. `%M'
  1563.      minute (00...59)
  1564.  
  1565. `%p'
  1566.      locale's AM or PM
  1567.  
  1568. `%r'
  1569.      time, 12-hour (hh:mm:ss [AP]M)
  1570.  
  1571. `%s'
  1572.      seconds since the epoch, i.e., 1 January 1970 00:00:00 UTC (a GNU
  1573.      extension)
  1574.  
  1575. `%S'
  1576.      second (00...61)
  1577.  
  1578. `%T'
  1579.      time, 24-hour (hh:mm:ss)
  1580.  
  1581. `%X'
  1582.      locale's time representation (%H:%M:%S)
  1583.  
  1584. `%Z'
  1585.      time zone (e.g., EDT), or nothing if no time zone is determinable
  1586.  
  1587. 
  1588. File: sh-utils.info,  Node: Date directives,  Next: Literal directives,  Prev: Time directives,  Up: date invocation
  1589.  
  1590. Date directives
  1591. ---------------
  1592.  
  1593.    `date' directives related to dates.
  1594.  
  1595. `%a'
  1596.      locale's abbreviated weekday name (Sun...Sat)
  1597.  
  1598. `%A'
  1599.      locale's full weekday name, variable length (Sunday...Saturday)
  1600.  
  1601. `%b'
  1602.      locale's abbreviated month name (Jan...Dec)
  1603.  
  1604. `%B'
  1605.      locale's full month name, variable length (January...December)
  1606.  
  1607. `%c'
  1608.      locale's date and time (Sat Nov 04 12:02:33 EST 1989)
  1609.  
  1610. `%d'
  1611.      day of month (01...31)
  1612.  
  1613. `%D'
  1614.      date (mm/dd/yy)
  1615.  
  1616. `%h'
  1617.      same as %b
  1618.  
  1619. `%j'
  1620.      day of year (001...366)
  1621.  
  1622. `%m'
  1623.      month (01...12)
  1624.  
  1625. `%U'
  1626.      week number of year with Sunday as first day of week (00...53)
  1627.  
  1628. `%w'
  1629.      day of week (0...6) with 0 corresponding to Sunday
  1630.  
  1631. `%W'
  1632.      week number of year with Monday as first day of week (00...53)
  1633.  
  1634. `%x'
  1635.      locale's date representation (mm/dd/yy)
  1636.  
  1637. `%y'
  1638.      last two digits of year (00...99)
  1639.  
  1640. `%Y'
  1641.      year (1970....)
  1642.  
  1643. 
  1644. File: sh-utils.info,  Node: Literal directives,  Next: Setting the time,  Prev: Date directives,  Up: date invocation
  1645.  
  1646. Literal directives
  1647. ------------------
  1648.  
  1649.    `date' directives that produce literal strings.
  1650.  
  1651. `%%'
  1652.      a literal %
  1653.  
  1654. `%n'
  1655.      a newline
  1656.  
  1657. `%t'
  1658.      a horizontal tab
  1659.  
  1660. 
  1661. File: sh-utils.info,  Node: Setting the time,  Next: Options for date,  Prev: Literal directives,  Up: date invocation
  1662.  
  1663. Setting the time
  1664. ----------------
  1665.  
  1666.    If given an argument that does not start with `+', `date' sets the
  1667. system clock to the time and date specified by that argument (as
  1668. described below).  You must have appropriate privileges to set the
  1669. system clock.  The `--date' and `--set' options may not be used with
  1670. such an argument.  The `--universal' option may be used with such an
  1671. argument to indicate that the specified time and date are relative to
  1672. Coordinated Universal Time rather than to the local time zone.
  1673.  
  1674.    The argument must consist entirely of digits, which have the
  1675. following meaning:
  1676.  
  1677. MM
  1678.      month
  1679.  
  1680. DD
  1681.      day within month
  1682.  
  1683. HH
  1684.      hour
  1685.  
  1686. MM
  1687.      minute
  1688.  
  1689. CC
  1690.      first two digits of year (optional)
  1691.  
  1692. YY
  1693.      last two digits of year (optional)
  1694.  
  1695. SS
  1696.      second (optional)
  1697.  
  1698.    The `--set' option also sets the system clock; see the next section.
  1699.  
  1700. 
  1701. File: sh-utils.info,  Node: Options for date,  Next: Examples of date,  Prev: Setting the time,  Up: date invocation
  1702.  
  1703. Options for `date'
  1704. ------------------
  1705.  
  1706.    The program accepts the following options.  Also see *Note Common
  1707. options::.
  1708.  
  1709. `-d DATESTR'
  1710. `--date=DATESTR'
  1711.      Display the time and date specified in DATESTR instead of the
  1712.      current time and date.  DATESTR can be in almost any common
  1713.      format.  It can contain month names, timezones, `am' and `pm',
  1714.      `yesterday', `ago', `next', etc.  The source file `getdate.y'
  1715.      implements this parsing for all GNU routines; we need precise
  1716.      documentation!
  1717.  
  1718. `-f DATEFILE'
  1719. `--file=DATEFILE'
  1720.      Parse each line in DATEFILE as with `-d' and display the resulting
  1721.      time and date.  If DATEFILE is `-', use standard input.  This is
  1722.      useful when you have many dates to process, because the system
  1723.      overhead of starting up the `date' executable many times can be
  1724.      considerable.
  1725.  
  1726. `-s DATESTR'
  1727. `--set=DATESTR'
  1728.      Set the time and date to DATESTR,  See `-d' above.
  1729.  
  1730. `-u'
  1731. `--utc'
  1732. `--universal'
  1733.      Print or set the time and date in Universal Coordinated Time
  1734.      instead of in local (wall clock) time.
  1735.  
  1736. 
  1737. File: sh-utils.info,  Node: Examples of date,  Prev: Options for date,  Up: date invocation
  1738.  
  1739. Examples of `date'
  1740. ------------------
  1741.  
  1742.    Here are a few examples.  Also see the documentation for the `-d'
  1743. option in the previous section.
  1744.  
  1745.    * To print the date of the day before yesterday:
  1746.  
  1747.           date --date='2 days ago'
  1748.  
  1749.    * To print the date of the day three months and one day hence:
  1750.           date --date='3 months 1 day'
  1751.  
  1752.    * To print the day of year of Christmas in the current year:
  1753.           date --date='25 Dec' +%j
  1754.  
  1755.    * To print the current full month name and the day of the month:
  1756.           date '+%B %d'
  1757.  
  1758.      But this may not be what you want because for the first nine days
  1759.      of the month, the `%d' expands to a zero-padded two-digit field,
  1760.      for example `date -d 1may '+%B %d'' will print `May 01'.
  1761.  
  1762.    * To print a date without the leading zero for one-digit days of the
  1763.      month, you can use the (GNU extension) `-' modifier to suppress
  1764.      the padding altogether.
  1765.           date -d=1may '+%B %-d'
  1766.  
  1767.    * To print the current date and time in the format required by many
  1768.      non-GNU versions of `date' when setting the system clock:
  1769.           date +%m%d%H%M%Y.%S
  1770.  
  1771.    * To set the system clock forward by two minutes:
  1772.           date --set='+2 minutes'
  1773.  
  1774. 
  1775. File: sh-utils.info,  Node: uname invocation,  Next: hostname invocation,  Prev: date invocation,  Up: System context
  1776.  
  1777. `uname': Print system information
  1778. =================================
  1779.  
  1780.    `uname' prints information about the machine and operating system it
  1781. is run on.  If no options are given, `uname' acts as if the `-s' option
  1782. were given.
  1783.  
  1784.    Synopsis:
  1785.  
  1786.      uname [ OPTION ]...
  1787.  
  1788.    If multiple options or `-a' are given, the selected information is
  1789. printed in this order:
  1790.  
  1791.      SYSNAME NODENAME RELEASE OSVERSION MACHINE
  1792.  
  1793.    The OSVERSION, at least, may well be multiple words.  For example:
  1794.  
  1795.      bash$ uname -a
  1796.      => Linux hayley 1.0.4 #3 Thu May 12 18:06:34 1994 i486
  1797.  
  1798.    The program accepts the following options.  Also see *Note Common
  1799. options::.
  1800.  
  1801. `-a'
  1802. `--all'
  1803.      Print all of the below information.
  1804.  
  1805. `-m'
  1806. `--machine'
  1807.      Print the machine (hardware) type.
  1808.  
  1809. `-n'
  1810. `--nodename'
  1811.      Print the machine's network node hostname.
  1812.  
  1813. `-r'
  1814. `--release'
  1815.      Print the operating system release.
  1816.  
  1817. `-s'
  1818. `--sysname'
  1819.      Print the operating system name.
  1820.  
  1821. `-v'
  1822.      Print the operating system version.
  1823.  
  1824. 
  1825. File: sh-utils.info,  Node: hostname invocation,  Prev: uname invocation,  Up: System context
  1826.  
  1827. `hostname': Print or set system name
  1828. ====================================
  1829.  
  1830.    With no arguments, `hostname' prints the name of the current host
  1831. system.  With one argument, it sets the current host name to the
  1832. specified string.  You must have appropriate privileges to set the host
  1833. name.
  1834.  
  1835.    Synopsis:
  1836.  
  1837.      hostname [ NAME ]
  1838.  
  1839.    The only options are `--help' and `--version'.  *Note Common
  1840. options::.
  1841.  
  1842. 
  1843. File: sh-utils.info,  Node: Modified command invocation,  Next: Delaying,  Prev: System context,  Up: Top
  1844.  
  1845. Modified command invocation
  1846. ***************************
  1847.  
  1848.    This section describes commands that run other commands in some
  1849. context different than the current one: a modified environment, as a
  1850. different user, etc.
  1851.  
  1852. * Menu:
  1853.  
  1854. * env invocation::              Modify environment variables.
  1855. * nice invocation::             Modify scheduling priority.
  1856. * nohup invocation::            Immunize to hangups.
  1857. * su invocation::               Modify user and group id.
  1858.  
  1859. 
  1860. File: sh-utils.info,  Node: env invocation,  Next: nice invocation,  Up: Modified command invocation
  1861.  
  1862. `env': Run a command in a modified environment
  1863. ==============================================
  1864.  
  1865.    `env' runs a command with an environment modified as specified by
  1866. the command line arguments.
  1867.  
  1868.    Synopses:
  1869.  
  1870.      env [ OPTION ]... [ NAME=VALUE ]... [ COMMAND [ ARGS ]... ]
  1871.      env
  1872.  
  1873.    Arguments of the form `VARIABLE=VALUE' set the environment variable
  1874. VARIABLE to value VALUE.  VALUE may be empty (`VARIABLE=').  Setting a
  1875. variable to an empty value is different from unsetting it.
  1876.  
  1877.    The first remaining argument specifies the program name to invoke;
  1878. it is searched for according to the `PATH' environment variable.  Any
  1879. remaining arguments are passed as arguments to that program.
  1880.  
  1881.    If no command name is specified following the environment
  1882. specifications, the resulting environment is printed.  This is like
  1883. specifying a command name of `printenv'.
  1884.  
  1885.    The program accepts the following options.  Also see *Note Common
  1886. options::.
  1887.  
  1888. `-u NAME'
  1889. `--unset=NAME'
  1890.      Remove variable NAME from the environment, if it was in the
  1891.      environment.
  1892.  
  1893. `-'
  1894. `-i'
  1895. `--ignore-environment'
  1896.      Start with an empty environment, ignoring the inherited
  1897.      environment.
  1898.  
  1899. 
  1900. File: sh-utils.info,  Node: nice invocation,  Next: nohup invocation,  Prev: env invocation,  Up: Modified command invocation
  1901.  
  1902. `nice': Run a command with modified scheduling priority
  1903. =======================================================
  1904.  
  1905.    If no arguments are given, `nice' prints the current scheduling
  1906. priority, which it inherited.  Otherwise, `nice' runs the given COMMAND
  1907. with its scheduling priority adjusted.  If no ADJUSTMENT is given, the
  1908. priority of the command is incremented by 10.  You must have
  1909. appropriate privileges to specify a negative adjustment.  The priority
  1910. can be adjusted by `nice' over the range of -20 (the highest priority)
  1911. to 19 (the lowest).
  1912.  
  1913.    Synopsis:
  1914.  
  1915.      nice [ OPTION ]... [ COMMAND [ ARG ]... ]
  1916.  
  1917.    Because most shells have a built-in command by the same name, using
  1918. the unadorned command name in a script or interactively may get you
  1919. different functionality than that described here.
  1920.  
  1921.    The program accepts the following option.  Also see *Note Common
  1922. options::.
  1923.  
  1924. `-n ADJUSTMENT'
  1925. `-ADJUSTMENT'
  1926. `--adjustment=ADJUSTMENT'
  1927.      Add ADJUSTMENT instead of 10 to the command's priority.
  1928.  
  1929. 
  1930. File: sh-utils.info,  Node: nohup invocation,  Next: su invocation,  Prev: nice invocation,  Up: Modified command invocation
  1931.  
  1932. `nohup': Run a command immune to hangups
  1933. ========================================
  1934.  
  1935.    `nohup' runs the given COMMAND with hangup signals ignored, so that
  1936. the command can continue running in the background after you log out.
  1937.  
  1938.    Synopsis:
  1939.  
  1940.      nohup COMMAND [ ARG ]...
  1941.  
  1942.    Also, the scheduling priority is increased by 5.  If standard output
  1943. is a tty, it and standard error are redirected so that they are
  1944. appended to the file `nohup.out'; if that cannot be written to, they are
  1945. appended to the file `$HOME/nohup.out'.  If that cannot be written to,
  1946. the command is not run.
  1947.  
  1948.    If `nohup' creates either `nohup.out' or `$HOME/nohup.out', it
  1949. creates it with no "group" or "other" access permissions.  It does not
  1950. change the permissions if the output file already existed.
  1951.  
  1952.    `nohup' does not automatically put the command it runs in the
  1953. background; you must do that explicitly, by ending the command line
  1954. with an `&'.
  1955.  
  1956.    The only options are `--help' and `--version'.  *Note Common
  1957. options::.
  1958.  
  1959. 
  1960. File: sh-utils.info,  Node: su invocation,  Prev: nohup invocation,  Up: Modified command invocation
  1961.  
  1962. `su': Run a command with substitute user and group id
  1963. =====================================================
  1964.  
  1965.    `su' allows one user to temporarily become another user.  It runs a
  1966. command (often an interactive shell) with the real and effective user
  1967. id, group id, and supplemental groups of a given USER.
  1968.  
  1969.    Synopsis:
  1970.  
  1971.      su [ OPTION ]... [ USER [ ARG ]... ]
  1972.  
  1973.    If no USER is given, the default is `root', the super-user.  The
  1974. shell to use is taken from USER's `passwd' entry, or `/bin/sh' if none
  1975. is specified there.  If USER has a password, `su' prompts for the
  1976. password unless run by a user with effective user id of zero (the
  1977. super-user).
  1978.  
  1979.    By default, `su' does not change the current directory.  It sets the
  1980. environment variables `HOME' and `SHELL' from the password entry for
  1981. USER, and if USER is not the super-user, sets `USER' and `LOGNAME' to
  1982. USER.  By default, the shell is not a login shell.
  1983.  
  1984.    Any additional ARGs are passed as additional arguments to the shell.
  1985.  
  1986.    GNU `su' does not treat `/bin/sh' or any other shells specially
  1987. (e.g., by setting `argv[0]' to `-su', passing `-c' only to certain
  1988. shells, etc.).
  1989.  
  1990.    `su' can optionally be compiled to use `syslog' to report failed,
  1991. and optionally successful, `su' attempts.  (If the system supports
  1992. `syslog'.)  However, GNU `su' does not check if the user is a member of
  1993. the `wheel' group; see below.
  1994.  
  1995.    The program accepts the following options.  Also see *Note Common
  1996. options::.
  1997.  
  1998. `-c COMMAND'
  1999. `--command=COMMAND'
  2000.      Pass COMMAND, a single command line to run, to the shell with a
  2001.      `-c' option instead of starting an interactive shell.
  2002.  
  2003. `-f'
  2004. `--fast'
  2005.      Pass the `-f' option to the shell.  This probably only makes sense
  2006.      if the shell run is `csh' or `tcsh', for which the `-f' option
  2007.      prevents reading the startup file (`.cshrc').  With Bourne-like
  2008.      shells, the `-f' option disables file name pattern expansion
  2009.      (globbing), which is not likely to be useful.
  2010.  
  2011. `-'
  2012. `-l'
  2013. `--login'
  2014.      Make the shell a login shell.  This means the following.  Unset all
  2015.      environment variables except `TERM', `HOME', and `SHELL' (which
  2016.      are set as described above), and `USER' and `LOGNAME' (which are
  2017.      set, even for the super-user, as described above), and set `PATH'
  2018.      to a compiled-in default value.  Change to USER's home directory.
  2019.      Prepend `-' to the shell's name, intended to make it read its
  2020.      login startup file(s).
  2021.  
  2022. `-m'
  2023. `-p'
  2024. `--preserve-environment'
  2025.      Do not change the environment variables `HOME', `USER', `LOGNAME',
  2026.      or `SHELL'.  Run the shell given in the environment variable
  2027.      `SHELL' instead of the shell from USER's passwd entry, unless the
  2028.      user running `su' is not the superuser and USER's shell is
  2029.      restricted.  A "restricted shell" is one that is not listed in the
  2030.      file `/etc/shells', or in a compiled-in list if that file does not
  2031.      exist.  Parts of what this option does can be overridden by
  2032.      `--login' and `--shell'.
  2033.  
  2034. `-s SHELL'
  2035. `--shell=SHELL'
  2036.      Run SHELL instead of the shell from USER's passwd entry, unless
  2037.      the user running `su' is not the superuser and USER's shell is
  2038.      restricted (see `-m' just above).
  2039.  
  2040. Why GNU `su' does not support the `wheel' group
  2041. ===============================================
  2042.  
  2043.    (This section is by Richard Stallman.)
  2044.  
  2045.    Sometimes a few of the users try to hold total power over all the
  2046. rest.  For example, in 1984, a few users at the MIT AI lab decided to
  2047. seize power by changing the operator password on the Twenex system and
  2048. keeping it secret from everyone else.  (I was able to thwart this coup
  2049. and give power back to the users by patching the kernel, but I wouldn't
  2050. know how to do that in Unix.)
  2051.  
  2052.    However, occasionally the rulers do tell someone.  Under the usual
  2053. `su' mechanism, once someone learns the root password who sympathizes
  2054. with the ordinary users, he or she can tell the rest.  The "wheel
  2055. group" feature would make this impossible, and thus cement the power of
  2056. the rulers.
  2057.  
  2058.    I'm on the side of the masses, not that of the rulers.  If you are
  2059. used to supporting the bosses and sysadmins in whatever they do, you
  2060. might find this idea strange at first.
  2061.  
  2062. 
  2063. File: sh-utils.info,  Node: Delaying,  Next: Index,  Prev: Modified command invocation,  Up: Top
  2064.  
  2065. Delaying
  2066. ********
  2067.  
  2068.    Perhaps `wait' or other commands should be described here also?
  2069.  
  2070. * Menu:
  2071.  
  2072. * sleep invocation::            Delay for a specified time.
  2073.  
  2074. 
  2075. File: sh-utils.info,  Node: sleep invocation,  Up: Delaying
  2076.  
  2077. `sleep': Delay for a specified time
  2078. ===================================
  2079.  
  2080.    `sleep' pauses for an amount of time specified by the sum of the
  2081. values of the command line arguments.
  2082.  
  2083.    Synopsis:
  2084.  
  2085.      sleep [ NUMBER[smhd] ]...
  2086.  
  2087.    Each argument is a number followed by an optional unit; the default
  2088. is seconds.  The units are:
  2089.  
  2090. `s'
  2091.      seconds
  2092.  
  2093. `m'
  2094.      minutes
  2095.  
  2096. `h'
  2097.      hours
  2098.  
  2099. `d'
  2100.      days
  2101.  
  2102.    The only options are `--help' and `--version'.  *Note Common
  2103. options::.
  2104.  
  2105. 
  2106. File: sh-utils.info,  Node: Index,  Prev: Delaying,  Up: Top
  2107.  
  2108. Index
  2109. *****
  2110.  
  2111. * Menu:
  2112.  
  2113. * !:                                    Connectives for test.
  2114. * !=:                                   String tests.
  2115. * %:                                    Numeric expressions.
  2116. * &:                                    Relations for expr.
  2117. * *:                                    Numeric expressions.
  2118. * +:                                    Numeric expressions.
  2119. * -:                                    Numeric expressions.
  2120. * -:                                    env invocation.
  2121. * -:                                    su invocation.
  2122. * -adjustment:                          nice invocation.
  2123. * -all:                                 stty invocation.
  2124. * -all:                                 uname invocation.
  2125. * -append:                              tee invocation.
  2126. * -command:                             su invocation.
  2127. * -count:                               who invocation.
  2128. * -date:                                Options for date.
  2129. * -fast:                                su invocation.
  2130. * -file:                                Options for date.
  2131. * -group:                               id invocation.
  2132. * -groups:                              id invocation.
  2133. * -heading:                             who invocation.
  2134. * -help:                                Common options.
  2135. * -idle:                                who invocation.
  2136. * -ignore-environment:                  env invocation.
  2137. * -ignore-interrupts:                   tee invocation.
  2138. * -login:                               su invocation.
  2139. * -machine:                             uname invocation.
  2140. * -mesg:                                who invocation.
  2141. * -message:                             who invocation.
  2142. * -name:                                id invocation.
  2143. * -nodename:                            uname invocation.
  2144. * -portability:                         pathchk invocation.
  2145. * -preserve-environment:                su invocation.
  2146. * -quiet:                               tty invocation.
  2147. * -real:                                id invocation.
  2148. * -release:                             uname invocation.
  2149. * -save:                                stty invocation.
  2150. * -set:                                 Options for date.
  2151. * -shell:                               su invocation.
  2152. * -silent:                              tty invocation.
  2153. * -sysname:                             uname invocation.
  2154. * -universal:                           Options for date.
  2155. * -user:                                id invocation.
  2156. * -utc:                                 Options for date.
  2157. * -version:                             Common options.
  2158. * -writable:                            who invocation.
  2159. * -ADJUSTMENT:                          nice invocation.
  2160. * -a:                                   uname invocation.
  2161. * -a:                                   tee invocation.
  2162. * -a:                                   Connectives for test.
  2163. * -a:                                   stty invocation.
  2164. * -b:                                   File type tests.
  2165. * -c:                                   File type tests.
  2166. * -c:                                   su invocation.
  2167. * -d:                                   Options for date.
  2168. * -d:                                   File type tests.
  2169. * -e:                                   File characteristics tests.
  2170. * -e:                                   echo invocation.
  2171. * -ef:                                  File characteristics tests.
  2172. * -eq:                                  Numeric tests.
  2173. * -f:                                   Options for date.
  2174. * -f:                                   su invocation.
  2175. * -f:                                   File type tests.
  2176. * -g:                                   Access permission tests.
  2177. * -G:                                   id invocation.
  2178. * -G:                                   Access permission tests.
  2179. * -g:                                   id invocation.
  2180. * -g:                                   stty invocation.
  2181. * -ge:                                  Numeric tests.
  2182. * -gt:                                  Numeric tests.
  2183. * -h:                                   File type tests.
  2184. * -H:                                   who invocation.
  2185. * -i:                                   tee invocation.
  2186. * -i:                                   who invocation.
  2187. * -i:                                   env invocation.
  2188. * -k:                                   Access permission tests.
  2189. * -L:                                   File type tests.
  2190. * -l:                                   su invocation.
  2191. * -le:                                  Numeric tests.
  2192. * -lt:                                  Numeric tests.
  2193. * -m:                                   su invocation.
  2194. * -m:                                   who invocation.
  2195. * -m:                                   uname invocation.
  2196. * -n:                                   String tests.
  2197. * -n:                                   echo invocation.
  2198. * -n:                                   id invocation.
  2199. * -n:                                   uname invocation.
  2200. * -n:                                   nice invocation.
  2201. * -ne:                                  Numeric tests.
  2202. * -nt:                                  File characteristics tests.
  2203. * -O:                                   Access permission tests.
  2204. * -o:                                   Connectives for test.
  2205. * -ot:                                  File characteristics tests.
  2206. * -p:                                   su invocation.
  2207. * -p:                                   File type tests.
  2208. * -p:                                   pathchk invocation.
  2209. * -q:                                   who invocation.
  2210. * -r:                                   id invocation.
  2211. * -r:                                   Access permission tests.
  2212. * -r:                                   uname invocation.
  2213. * -s:                                   File characteristics tests.
  2214. * -s:                                   who invocation.
  2215. * -S:                                   File type tests.
  2216. * -s:                                   uname invocation.
  2217. * -s:                                   Options for date.
  2218. * -s:                                   su invocation.
  2219. * -s:                                   tty invocation.
  2220. * -t:                                   File type tests.
  2221. * -T:                                   who invocation.
  2222. * -u:                                   Options for date.
  2223. * -u:                                   env invocation.
  2224. * -u:                                   Access permission tests.
  2225. * -u:                                   who invocation.
  2226. * -u:                                   id invocation.
  2227. * -unset:                               env invocation.
  2228. * -v:                                   uname invocation.
  2229. * -w:                                   who invocation.
  2230. * -w:                                   Access permission tests.
  2231. * -x:                                   Access permission tests.
  2232. * -z:                                   String tests.
  2233. * .cshrc:                               su invocation.
  2234. * /:                                    Numeric expressions.
  2235. * /bin/sh:                              su invocation.
  2236. * /etc/passwd:                          su invocation.
  2237. * /etc/shells:                          su invocation.
  2238. * /etc/utmp:                            who invocation.
  2239. * /etc/utmp:                            users invocation.
  2240. * /etc/utmp:                            logname invocation.
  2241. * /etc/wtmp:                            users invocation.
  2242. * /etc/wtmp:                            who invocation.
  2243. * <:                                    Relations for expr.
  2244. * <=:                                   Relations for expr.
  2245. * =:                                    String tests.
  2246. * =:                                    Relations for expr.
  2247. * ==:                                   Relations for expr.
  2248. * >:                                    Relations for expr.
  2249. * >=:                                   Relations for expr.
  2250. * date options:                         Options for date.
  2251. * -su:                                  su invocation.
  2252. * access permission tests:              Access permission tests.
  2253. * addition:                             Numeric expressions.
  2254. * am i:                                 who invocation.
  2255. * and operator:                         Connectives for test.
  2256. * and operator:                         Relations for expr.
  2257. * appropriate privileges:               hostname invocation.
  2258. * appropriate privileges:               nice invocation.
  2259. * appropriate privileges:               Setting the time.
  2260. * arbitrary date strings, parsing:      Options for date.
  2261. * arbitrary text, displaying:           echo invocation.
  2262. * arithmetic tests:                     Numeric tests.
  2263. * background jobs, stopping at terminal write: Local.
  2264. * backslash escapes:                    echo invocation.
  2265. * basename:                             basename invocation.
  2266. * baud rate, setting:                   Special.
  2267. * beeping at input buffer full:         Input.
  2268. * beginning of time:                    Time directives.
  2269. * block special check:                  File type tests.
  2270. * breaks, cause interrupts:             Input.
  2271. * breaks, ignoring:                     Input.
  2272. * brkint:                               Input.
  2273. * bsN:                                  Output.
  2274. * bugs, reporting:                      Introduction.
  2275. * built-in shell commands, conflicts with: nice invocation.
  2276. * built-in shell commands, conflicts with: pwd invocation.
  2277. * built-in shell commands, conflicts with: test invocation.
  2278. * C-s/C-q flow control:                 Input.
  2279. * case translation:                     Local.
  2280. * cbreak:                               Combination.
  2281. * change or print terminal settings:    stty invocation.
  2282. * character size:                       Control.
  2283. * character special check:              File type tests.
  2284. * characters, special:                  Characters.
  2285. * check file types:                     test invocation.
  2286. * clocal:                               Control.
  2287. * cols:                                 Special.
  2288. * columns:                              Special.
  2289. * COLUMNS:                              Special.
  2290. * combination settings:                 Combination.
  2291. * commands for delaying:                Delaying.
  2292. * commands for exit status:             Conditions.
  2293. * commands for file name manipulation:  File name manipulation.
  2294. * commands for invoking other commands: Modified command invocation.
  2295. * commands for printing text:           Printing text.
  2296. * commands for printing the working context: Working context information.
  2297. * commands for printing user information: User information.
  2298. * commands for redirection:             Redirection.
  2299. * commands for system context:          System context.
  2300. * common options:                       Common options.
  2301. * compare values:                       test invocation.
  2302. * comparison operators:                 Relations for expr.
  2303. * conditions:                           Conditions.
  2304. * conflicts with shell built-ins:       nice invocation.
  2305. * conflicts with shell built-ins:       pwd invocation.
  2306. * conflicts with shell built-ins:       test invocation.
  2307. * connectives, logical:                 Relations for expr.
  2308. * connectives, logical:                 Connectives for test.
  2309. * context, system:                      System context.
  2310. * control characters, using ^C:         Local.
  2311. * control settings:                     Control.
  2312. * cooked:                               Combination.
  2313. * coordinated universal time:           Options for date.
  2314. * crN:                                  Output.
  2315. * cread:                                Control.
  2316. * crt:                                  Combination.
  2317. * crterase:                             Local.
  2318. * crtkill:                              Local.
  2319. * crtscts:                              Control.
  2320. * csN:                                  Control.
  2321. * cstopb:                               Control.
  2322. * ctlecho:                              Local.
  2323. * current working directory, printing:  pwd invocation.
  2324. * date:                                 date invocation.
  2325. * date directives:                      Date directives.
  2326. * date strings, parsing:                Options for date.
  2327. * dec:                                  Combination.
  2328. * decctlq:                              Combination.
  2329. * delay for a specified time:           sleep invocation.
  2330. * delaying commands:                    Delaying.
  2331. * destinations, multiple output:        tee invocation.
  2332. * directives, date:                     Date directives.
  2333. * directives, literal:                  Literal directives.
  2334. * directives, time:                     Time directives.
  2335. * directory check:                      File type tests.
  2336. * directory components, printing:       dirname invocation.
  2337. * directory, stripping from file names: basename invocation.
  2338. * dirname:                              dirname invocation.
  2339. * disabling special characters:         Characters.
  2340. * displaying text:                      echo invocation.
  2341. * division:                             Numeric expressions.
  2342. * do nothing, successfully:             true invocation.
  2343. * dsusp:                                Characters.
  2344. * echo:                                 Local.
  2345. * echo:                                 echo invocation.
  2346. * echoctl:                              Local.
  2347. * echoe:                                Local.
  2348. * echok:                                Local.
  2349. * echoke:                               Local.
  2350. * echonl:                               Local.
  2351. * echoprt:                              Local.
  2352. * effective uid and gid, printing:      id invocation.
  2353. * effective UID, printing:              whoami invocation.
  2354. * eight-bit characters:                 Combination.
  2355. * eight-bit characters:                 Control.
  2356. * eight-bit input:                      Input.
  2357. * ek:                                   Combination.
  2358. * env:                                  env invocation.
  2359. * environment variables, printing:      printenv invocation.
  2360. * environment, preserving:              su invocation.
  2361. * environment, printing:                env invocation.
  2362. * environment, running a program in a modified: env invocation.
  2363. * eof:                                  Characters.
  2364. * eol:                                  Characters.
  2365. * eol2:                                 Characters.
  2366. * epoch, seconds since:                 Time directives.
  2367. * equal string check:                   String tests.
  2368. * erase:                                Characters.
  2369. * evaluation of expressions:            expr invocation.
  2370. * even parity:                          Control.
  2371. * evenp:                                Combination.
  2372. * examples of date:                     Examples of date.
  2373. * examples of expr:                     Examples of expr.
  2374. * executable file check:                Access permission tests.
  2375. * existence-of-file check:              File characteristics tests.
  2376. * exit status commands:                 Conditions.
  2377. * exit status of expr:                  expr invocation.
  2378. * exit status of pathchk:               pathchk invocation.
  2379. * exit status of printenv:              printenv invocation.
  2380. * exit status of true:                  true invocation.
  2381. * exit status of true:                  false invocation.
  2382. * exit status of tty:                   tty invocation.
  2383. * expr:                                 expr invocation.
  2384. * expression evaluation:                test invocation.
  2385. * expression evaluation:                expr invocation.
  2386. * expressions, numeric:                 Numeric expressions.
  2387. * expressions, string:                  String expressions.
  2388. * failure exit status:                  false invocation.
  2389. * false:                                false invocation.
  2390. * fascism:                              su invocation.
  2391. * ffN:                                  Output.
  2392. * fields, padding numeric:              date invocation.
  2393. * file characteristics tests:           File characteristics tests.
  2394. * file name manipulation:               File name manipulation.
  2395. * file name pattern expansion, disabled: su invocation.
  2396. * file names, checking validity and portability: pathchk invocation.
  2397. * file names, stripping directory and suffix: basename invocation.
  2398. * file type tests:                      File type tests.
  2399. * flow control, hardware:               Control.
  2400. * flow control, software:               Input.
  2401. * flushing, disabling:                  Local.
  2402. * formatting times:                     date invocation.
  2403. * getdate.y:                            Options for date.
  2404. * globbing, disabled:                   su invocation.
  2405. * Greenwich Mean Time:                  Options for date.
  2406. * group wheel, not supported:           su invocation.
  2407. * groups:                               groups invocation.
  2408. * hangups, immunity to:                 nohup invocation.
  2409. * hard link check:                      File characteristics tests.
  2410. * hardware flow control:                Control.
  2411. * hardware type:                        uname invocation.
  2412. * hat notation for control characters:  Local.
  2413. * help, online:                         Common options.
  2414. * history:                              Introduction.
  2415. * HOME:                                 su invocation.
  2416. * hostname:                             hostname invocation.
  2417. * hostname:                             uname invocation.
  2418. * hup[cl]:                              Control.
  2419. * icanon:                               Local.
  2420. * icrnl:                                Input.
  2421. * id:                                   id invocation.
  2422. * idle time:                            who invocation.
  2423. * iexten:                               Local.
  2424. * ignbrk:                               Input.
  2425. * igncr:                                Input.
  2426. * ignpar:                               Input.
  2427. * imaxbel:                              Input.
  2428. * immunity to hangups:                  nohup invocation.
  2429. * index:                                String expressions.
  2430. * information, about current users:     who invocation.
  2431. * inlcr:                                Input.
  2432. * inpck:                                Input.
  2433. * input settings:                       Input.
  2434. * intr:                                 Characters.
  2435. * introduction:                         Introduction.
  2436. * invocation of commands, modified:     Modified command invocation.
  2437. * isig:                                 Local.
  2438. * ispeed:                               Special.
  2439. * istrip:                               Input.
  2440. * iuclc:                                Input.
  2441. * ixany:                                Input.
  2442. * ixoff:                                Input.
  2443. * ixon:                                 Input.
  2444. * kill:                                 Characters.
  2445. * last DAY:                             Options for date.
  2446. * LCASE:                                Combination.
  2447. * lcase:                                Combination.
  2448. * leading directory components, stripping: basename invocation.
  2449. * length:                               String expressions.
  2450. * line:                                 Special.
  2451. * line settings of terminal:            stty invocation.
  2452. * LINES:                                Special.
  2453. * literal directives:                   Literal directives.
  2454. * litout:                               Combination.
  2455. * lnext:                                Characters.
  2456. * local settings:                       Local.
  2457. * logical and operator:                 Relations for expr.
  2458. * logical and operator:                 Connectives for test.
  2459. * logical connectives:                  Relations for expr.
  2460. * logical connectives:                  Connectives for test.
  2461. * logical or operator:                  Relations for expr.
  2462. * logical or operator:                  Connectives for test.
  2463. * login name, printing:                 logname invocation.
  2464. * login sessions, printing users with:  users invocation.
  2465. * login shell:                          su invocation.
  2466. * login shell, creating:                su invocation.
  2467. * login time:                           who invocation.
  2468. * logname:                              logname invocation.
  2469. * LOGNAME:                              su invocation.
  2470. * lowercase, translating to output:     Output.
  2471. * machine type:                         uname invocation.
  2472. * machine-readable stty output:         stty invocation.
  2473. * manipulation of file names:           File name manipulation.
  2474. * match:                                String expressions.
  2475. * matching patterns:                    String expressions.
  2476. * message status:                       who invocation.
  2477. * min:                                  Special.
  2478. * MIT AI lab:                           su invocation.
  2479. * modem control:                        Control.
  2480. * modified command invocation:          Modified command invocation.
  2481. * modified environment, running a program in: env invocation.
  2482. * modifying scheduling priority:        nice invocation.
  2483. * multiplication:                       Numeric expressions.
  2484. * name of operating system:             uname invocation.
  2485. * named pipe check:                     File type tests.
  2486. * network node name:                    uname invocation.
  2487. * newer-than file check:                File characteristics tests.
  2488. * newline echoing after kill:           Local.
  2489. * newline, echoing:                     Local.
  2490. * newline, translating to crlf:         Output.
  2491. * newline, translating to return:       Input.
  2492. * next DAY:                             Options for date.
  2493. * nice:                                 nice invocation.
  2494. * nl:                                   Combination.
  2495. * nlN:                                  Output.
  2496. * no-op:                                true invocation.
  2497. * node name:                            uname invocation.
  2498. * noflsh:                               Local.
  2499. * nohup:                                nohup invocation.
  2500. * nohup.out:                            nohup invocation.
  2501. * nohup.out:                            nohup invocation.
  2502. * non-directory suffix, stripping:      dirname invocation.
  2503. * nonempty file check:                  File characteristics tests.
  2504. * nonzero-length string check:          String tests.
  2505. * not-equal string check:               String tests.
  2506. * numeric expressions:                  Numeric expressions.
  2507. * numeric field padding:                date invocation.
  2508. * numeric tests:                        Numeric tests.
  2509. * ocrnl:                                Output.
  2510. * odd parity:                           Control.
  2511. * oddp:                                 Combination.
  2512. * ofdel:                                Output.
  2513. * ofill:                                Output.
  2514. * olcuc:                                Output.
  2515. * older-than file check:                File characteristics tests.
  2516. * onlcr:                                Output.
  2517. * onlret:                               Output.
  2518. * onocr:                                Output.
  2519. * operating system name:                uname invocation.
  2520. * operating system release:             uname invocation.
  2521. * operating system version:             uname invocation.
  2522. * opost:                                Output.
  2523. * options for date:                     Options for date.
  2524. * or operator:                          Relations for expr.
  2525. * or operator:                          Connectives for test.
  2526. * ospeed:                               Special.
  2527. * output settings:                      Output.
  2528. * owned by effective gid check:         Access permission tests.
  2529. * owned by effective uid check:         Access permission tests.
  2530. * pad character:                        Output.
  2531. * pad instead of timing for delaying:   Output.
  2532. * padding of numeric fields:            date invocation.
  2533. * parenb:                               Control.
  2534. * parentheses for grouping:             expr invocation.
  2535. * parity:                               Combination.
  2536. * parity errors, marking:               Input.
  2537. * parity, ignoring:                     Input.
  2538. * parmrk:                               Input.
  2539. * parodd:                               Control.
  2540. * parsing date strings:                 Options for date.
  2541. * pass8:                                Combination.
  2542. * passwd entry, and su shell:           su invocation.
  2543. * PATH:                                 env invocation.
  2544. * PATH:                                 su invocation.
  2545. * pathchk:                              pathchk invocation.
  2546. * pattern matching:                     String expressions.
  2547. * permission tests:                     Access permission tests.
  2548. * pipe fitting:                         tee invocation.
  2549. * portable file names, checking for:    pathchk invocation.
  2550. * POSIX.2:                              Introduction.
  2551. * print name of current directory:      pwd invocation.
  2552. * print system information:             uname invocation.
  2553. * print terminal file name:             tty invocation.
  2554. * printenv:                             printenv invocation.
  2555. * printf:                               printf invocation.
  2556. * printing all or some environment variables: printenv invocation.
  2557. * printing current user information:    who invocation.
  2558. * printing current usernames:           users invocation.
  2559. * printing groups a user is in:         groups invocation.
  2560. * printing real and effective uid and gid: id invocation.
  2561. * printing text:                        echo invocation.
  2562. * printing text, commands for:          Printing text.
  2563. * printing the current time:            date invocation.
  2564. * printing the effective UID:           whoami invocation.
  2565. * printing the hostname:                hostname invocation.
  2566. * printing user's login name:           logname invocation.
  2567. * priority, modifying:                  nice invocation.
  2568. * prterase:                             Local.
  2569. * pwd:                                  pwd invocation.
  2570. * quit:                                 Characters.
  2571. * raw:                                  Combination.
  2572. * read from stdin and write to stdout and files: tee invocation.
  2573. * readable file check:                  Access permission tests.
  2574. * real uid and gid, printing:           id invocation.
  2575. * redirection:                          Redirection.
  2576. * regular expression matching:          String expressions.
  2577. * regular file check:                   File type tests.
  2578. * relations, numeric or string:         Relations for expr.
  2579. * release of operating system:          uname invocation.
  2580. * remainder:                            Numeric expressions.
  2581. * remote hostname:                      who invocation.
  2582. * repeated output of a string:          yes invocation.
  2583. * restricted shell:                     su invocation.
  2584. * return, ignoring:                     Input.
  2585. * return, translating to newline:       Output.
  2586. * return, translating to newline:       Input.
  2587. * root, becoming:                       su invocation.
  2588. * rows:                                 Special.
  2589. * rprnt:                                Characters.
  2590. * RTS/CTS flow control:                 Control.
  2591. * same file check:                      File characteristics tests.
  2592. * sane:                                 Combination.
  2593. * scheduling priority, modifying:       nice invocation.
  2594. * seconds since the epoch:              Time directives.
  2595. * set-group-id check:                   Access permission tests.
  2596. * set-user-id check:                    Access permission tests.
  2597. * setting the hostname:                 hostname invocation.
  2598. * setting the time:                     Setting the time.
  2599. * SHELL:                                su invocation.
  2600. * shell utilities:                      Top.
  2601. * size:                                 Special.
  2602. * sleep:                                sleep invocation.
  2603. * socket check:                         File type tests.
  2604. * software flow control:                Input.
  2605. * special characters:                   Characters.
  2606. * special settings:                     Special.
  2607. * speed:                                Special.
  2608. * start:                                Characters.
  2609. * sticky bit check:                     Access permission tests.
  2610. * stop:                                 Characters.
  2611. * stop bits:                            Control.
  2612. * strftime and date:                    date invocation.
  2613. * string expressions:                   String expressions.
  2614. * string tests:                         String tests.
  2615. * strip directory and suffix from file names: basename invocation.
  2616. * stripping non-directory suffix:       dirname invocation.
  2617. * stty:                                 stty invocation.
  2618. * su:                                   su invocation.
  2619. * substitute user and group ids:        su invocation.
  2620. * substr:                               String expressions.
  2621. * subtraction:                          Numeric expressions.
  2622. * successful exit:                      true invocation.
  2623. * suffix, stripping from file names:    basename invocation.
  2624. * super-user, becoming:                 su invocation.
  2625. * supplementary groups, printing:       groups invocation.
  2626. * susp:                                 Characters.
  2627. * swtch:                                Characters.
  2628. * symbolic link check:                  File type tests.
  2629. * symbolic links and pwd:               pwd invocation.
  2630. * syslog:                               su invocation.
  2631. * system context:                       System context.
  2632. * system information, printing:         uname invocation.
  2633. * system name, printing:                hostname invocation.
  2634. * tabN:                                 Output.
  2635. * tabs:                                 Combination.
  2636. * tandem:                               Input.
  2637. * tee:                                  tee invocation.
  2638. * TERM:                                 su invocation.
  2639. * terminal check:                       File type tests.
  2640. * terminal file name, printing:         tty invocation.
  2641. * terminal lines, currently used:       who invocation.
  2642. * terminal settings:                    stty invocation.
  2643. * test:                                 test invocation.
  2644. * text, displaying:                     echo invocation.
  2645. * time:                                 Special.
  2646. * time directives:                      Time directives.
  2647. * time formats:                         date invocation.
  2648. * time setting:                         Setting the time.
  2649. * time units:                           sleep invocation.
  2650. * time, printing or setting:            date invocation.
  2651. * tomorrow:                             Options for date.
  2652. * tostop:                               Local.
  2653. * true:                                 true invocation.
  2654. * tty:                                  tty invocation.
  2655. * Twenex:                               su invocation.
  2656. * two-way parity:                       Control.
  2657. * u, and disabling special characters:  Characters.
  2658. * uname:                                uname invocation.
  2659. * uppercase, translating to lowercase:  Input.
  2660. * USER:                                 su invocation.
  2661. * user id, switching:                   su invocation.
  2662. * user information, commands for:       User information.
  2663. * user name, printing:                  logname invocation.
  2664. * usernames, printing current:          users invocation.
  2665. * users:                                users invocation.
  2666. * utilities for shell programming:      Top.
  2667. * utmp:                                 logname invocation.
  2668. * valid file names, checking for:       pathchk invocation.
  2669. * version number, finding:              Common options.
  2670. * version of operating system:          uname invocation.
  2671. * vtN:                                  Output.
  2672. * werase:                               Characters.
  2673. * wheel group, not supported:           su invocation.
  2674. * who:                                  who invocation.
  2675. * who am i:                             who invocation.
  2676. * whoami:                               whoami invocation.
  2677. * working context:                      Working context information.
  2678. * working directory, printing:          pwd invocation.
  2679. * writable file check:                  Access permission tests.
  2680. * write, allowed:                       who invocation.
  2681. * xcase:                                Local.
  2682. * XON/XOFF flow control:                Input.
  2683. * yes:                                  yes invocation.
  2684. * yesterday:                            Options for date.
  2685. * zero-length string check:             String tests.
  2686. * \0ooo:                                printf invocation.
  2687. * \0xhhh:                               printf invocation.
  2688. * \c:                                   printf invocation.
  2689. * |:                                    Relations for expr.
  2690.  
  2691.  
  2692. 
  2693. Tag Table:
  2694. Node: Top2831
  2695. Node: Introduction3654
  2696. Node: Common options5097
  2697. Node: Printing text5809
  2698. Node: echo invocation6183
  2699. Node: printf invocation7174
  2700. Node: yes invocation8153
  2701. Node: Conditions8614
  2702. Node: false invocation9201
  2703. Node: true invocation9634
  2704. Node: test invocation10144
  2705. Node: File type tests11284
  2706. Node: Access permission tests12075
  2707. Node: File characteristics tests12840
  2708. Node: String tests13507
  2709. Node: Numeric tests14089
  2710. Node: Connectives for test14873
  2711. Node: expr invocation15213
  2712. Node: Relations for expr16354
  2713. Node: Numeric expressions17048
  2714. Node: String expressions17646
  2715. Node: Examples of expr19350
  2716. Node: Redirection19932
  2717. Node: tee invocation20373
  2718. Node: File name manipulation21201
  2719. Node: basename invocation21657
  2720. Node: dirname invocation22221
  2721. Node: pathchk invocation22735
  2722. Node: Working context information23898
  2723. Node: pwd invocation24574
  2724. Node: stty invocation25186
  2725. Node: Control27095
  2726. Node: Input27843
  2727. Node: Output29200
  2728. Node: Local30444
  2729. Node: Combination32011
  2730. Node: Characters34149
  2731. Node: Special35689
  2732. Node: printenv invocation37027
  2733. Node: tty invocation37750
  2734. Node: User information38445
  2735. Node: id invocation39105
  2736. Node: logname invocation40248
  2737. Node: whoami invocation40751
  2738. Node: groups invocation41145
  2739. Node: users invocation41791
  2740. Node: who invocation42603
  2741. Node: System context44320
  2742. Node: date invocation44743
  2743. Node: Time directives46107
  2744. Node: Date directives46761
  2745. Node: Literal directives47758
  2746. Node: Setting the time48042
  2747. Node: Options for date49017
  2748. Node: Examples of date50197
  2749. Node: uname invocation51482
  2750. Node: hostname invocation52587
  2751. Node: Modified command invocation53086
  2752. Node: env invocation53653
  2753. Node: nice invocation54916
  2754. Node: nohup invocation56042
  2755. Node: su invocation57165
  2756. Node: Delaying61441
  2757. Node: sleep invocation61698
  2758. Node: Index62230
  2759. 
  2760. End Tag Table
  2761.